From owner-freebsd-questions@FreeBSD.ORG Tue Feb 12 00:07:56 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2ED9216A421 for ; Tue, 12 Feb 2008 00:07:56 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from fw.farid-hajji.net (fw.farid-hajji.net [213.146.115.42]) by mx1.freebsd.org (Postfix) with ESMTP id B977313C4E3 for ; Tue, 12 Feb 2008 00:07:55 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from epia-2.farid-hajji.net (epia-2 [192.168.254.11]) by fw.farid-hajji.net (Postfix) with ESMTP id BE915E008B; Tue, 12 Feb 2008 01:07:53 +0100 (CET) Date: Mon, 11 Feb 2008 17:07:53 -0700 From: cpghost To: Wojciech Puchar Message-ID: <20080212000752.GA89042@epia-2.farid-hajji.net> References: <20080211171152.S4377@wojtek.tensor.gdynia.pl> <20080211173958.W4493@wojtek.tensor.gdynia.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080211173958.W4493@wojtek.tensor.gdynia.pl> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-questions@freebsd.org Subject: Re: HTTP POST X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Feb 2008 00:07:56 -0000 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 > > P= 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: Content-type: Good luck! > i have HTTP RFC, but possibly didn't RTFM right. Regards, -cpghost. -- Cordula's Web. http://www.cordula.ws/