Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6670577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:17:08+00:00 2026-05-26T03:17:08+00:00

To create a comet connection (hanging get) i am not specifying the content-length in

  • 0

To create a comet connection (hanging get) i am not specifying the content-length in HTTP Header. This works on my system but will requested from another machine of institute LAN, it gives 502 Bad Gateway for the request.

If i mention content-length, i get the response but the connection gets closed, which i dont want. What can be the alternatives to this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T03:17:08+00:00Added an answer on May 26, 2026 at 3:17 am

    Follow the HTTP/1.1 specification for connection persistence. Return HTTP/1.1 in the reply. If the query was HTTP/1.1, default to keeping the connection open. If the query wasn’t, default to closing it. If you get a Connection: close header, close the connection after sending the response. If you get a Connection: keep-alive header, keep the connection open even if that wasn’t the protocol default.

    If you don’t want to follow HTTP/1.1, you can probably get connection persistence anyway. Just always include a Connection: Keep-Alive header if you successfully establish persistence through the rules above. Send a Connection: Close header if you cannot support a persistent connection even though the client requested one.

    Basically, follow the HTTP specification. If you know the content length, you should always send a Content-Length header. Use the persistence negotiation rules to establish a persistent connection if the client can support one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How to create simple PHP COMET server page displaying current time? I need code
I'm trying to create a AJAX push implementation in PHP using a Comet long-polling
How can i create/convert this script into model in Backbone that can use SignaR
I've seen this problem come up a lot, but never adequately handled, and I
I'm trying to implement a comet style, long polling connection using an XMLHttpResponse object.
I'm trying to create an OleDb connection to an Excel file that is located
I'm using this guide to create a HTTPHandler that combines script and css files
I'm trying out the gwt-comet extension here . I cant get any messages from
This code: conn = connect('emails.db') curs = conn.cursor() curs.execute('''create table items (integer primary key,
I create a new connection thread each time a connection with a client is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.