"MUST REPLY" HTTP response headers

M

mike

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
 
R

Rogan Dawes

mike said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top