Hi Mike,

Only the POST and PUT methods upload a document, and therefore only these two methods will cause the CONTENT_LENGTH to be set above 0.

GET, HEAD, DELETE, TRACE, CONNECT and OPTIONS do not upload content, and therefore the content-length should always be 0 for those. However, the REQUEST_METHOD should contain 'GET' and therefore your code (Which acts differently based on the request method) should do something different as well.

As to why you'd get CONTENT_LENGTH=0 with POST... I don't know. The only reason that SHOULD happen is if you didn't provide any content. Presumably that's not the case?


Mike wrote:
I didn't mention to make this more interesting, doing a GET with the same
logic returns a 0 CONTENT_LENGTH and still returns the parameters. A POST
doesn't return the parameters.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.