php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #57426 No way to disable the 'Expect' header on http requests
Submitted: 2006-12-13 22:09 UTC Modified: 2007-02-15 09:38 UTC
From: tjerk dot meesters at muvee dot com Assigned: mike (profile)
Status: Not a bug Package: pecl_http (PECL)
PHP Version: 5.2.0 RC4 OS: Windows XP Pro
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tjerk dot meesters at muvee dot com
New email:
PHP Version: OS:

 

 [2006-12-13 22:09 UTC] tjerk dot meesters at muvee dot com
Description:
------------
During the implementation of a remote API, I ran into some problems when uploading files to a lighttpd server. The error returned from the server is '417 - Expectation failed'.

When I upload to an Apache server, this problem doesn't occur, but what I did notice was an unusual header in the request arguments:

Except: 100-continue

Is there a way to disable this particular feature? Maybe by switching back to HTTP/1.0 instead of HTTP/1.1?


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-13 22:53 UTC] tjerk dot meesters at muvee dot com
I found the problem(s):
1) lighttpd doesn't support HTTP/1.1 Expect
2) Changing the protocol is easier than I though (although it's not particularly well documented)

$req->setOptions(array(
  'protocol' => HTTP_VERSION_1_0,
));
 [2007-01-12 10:23 UTC] mike@php.net
You can also disable the Expect header with $r->setHeaders(array("Expect"=>null));
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 00:01:35 2025 UTC