Date: Mon, 11 Feb 2008 17:07:53 -0700 From: cpghost <cpghost@cordula.ws> To: Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl> Cc: freebsd-questions@freebsd.org Subject: Re: HTTP POST Message-ID: <20080212000752.GA89042@epia-2.farid-hajji.net> In-Reply-To: <20080211173958.W4493@wojtek.tensor.gdynia.pl> References: <20080211171152.S4377@wojtek.tensor.gdynia.pl> <20080211173958.W4493@wojtek.tensor.gdynia.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 11, 2008 at 05:43:23PM +0100, Wojciech Puchar wrote: > i have no problems with GET and HEAD. with POST i have. > > page is simple form just to upload image. it has one field TYPE=file NAME=P > and submit button. > > my program gets from the browser: > > > all browser data etc.. hostname > POST URL HTTP/1.1 > <empty line here> > P=<filename> Hmmm, this is not really HTTP/1.1 compliant! At least the Host header is missing! According to RFC 2616 (HTTP/1.1): 9. The Host request header field (section 14.23) MUST accompany all HTTP/1.1 requests. This is because most web servers do virtual domain hosting on a single IP and use the Host header to disambiguate between hosts/domains. Try adding Host, and if that's not enough, you may need to add more headers, like, say: Connection: close Content-length: <length of message in bytes> Content-type: <some mime type> Good luck! > i have HTTP RFC, but possibly didn't RTFM right. Regards, -cpghost. -- Cordula's Web. http://www.cordula.ws/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080212000752.GA89042>