"MUST REPLY" HTTP response headers

Discussion in 'Java' started by mike, Apr 13, 2005.

  1. mike

    mike Guest

    regards:

    I write java code to simulate my machine as a HTTP server,
    what is the "MUST REPLY" HTTP response headers?

    In my small survey,I think there are 2 "MUST REPLY" HTTP response
    headers.

    (1)Content-Length: (length of content which will be transmitted)
    (2)Content-Type: (by
    http://www.iana.org/assignments/media-types/)

    Does the program logic make sense?

    thank you for your patient reply and instructions.
    May goodness be with you all
     
    mike, Apr 13, 2005
    #1
    1. Advertisements

  2. mike

    Rogan Dawes Guest

    mike wrote:
    > regards:
    >
    > I write java code to simulate my machine as a HTTP server,
    > what is the "MUST REPLY" HTTP response headers?
    >
    > In my small survey,I think there are 2 "MUST REPLY" HTTP response
    > headers.
    >
    > (1)Content-Length: (length of content which will be transmitted)
    > (2)Content-Type: (by
    > http://www.iana.org/assignments/media-types/)
    >
    > Does the program logic make sense?
    >
    > thank you for your patient reply and instructions.
    > May goodness be with you all


    Read the RFC - RFC 2616, Sections 6 and 7, to be precise.

    Neither of those headers that you mention are REQUIRED as such. End of
    content can be signalled by simply closing the connection, and
    applications can "guess" the content-type if the Content-Type header is
    not present.

    Rogan
    --
    Rogan Dawes

    *ALL* messages to will be dropped, and added
    to my blacklist. Please respond to "nntp AT dawes DOT za DOT net"
     
    Rogan Dawes, Apr 13, 2005
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sam
    Replies:
    3
    Views:
    6,055
    Rick Strahl [MVP]
    Dec 8, 2003
  2. Shachar Tal
    Replies:
    0
    Views:
    575
    Shachar Tal
    Jun 20, 2004
  3. mike
    Replies:
    5
    Views:
    1,213
    Keith M. Corbett
    Sep 21, 2004
  4. otf
    Replies:
    0
    Views:
    755
  5. Vivek Mehta
    Replies:
    3
    Views:
    8,926
    Vivek Mehta
    Aug 12, 2004
  6. Flip Rayner
    Replies:
    1
    Views:
    974
    bruce barker
    Jan 23, 2007
  7. Replies:
    3
    Views:
    1,074
    Guillermo
    Apr 26, 2007
  8. Ian
    Replies:
    2
    Views:
    2,763
Loading...