https://bugzilla.wikimedia.org/show_bug.cgi?id=26631
--- Comment #1 from Brion Vibber <br...@pobox.com> 2011-01-08 00:52:45 UTC --- Unfortunately I don't think PHP exposes a way to handle this. Quick summary of how it's intended to work: - client sends *headers only* for an HTTP POST request, including the 'Expect: 100-continue" header - client waits for a bit while... - server processes the headers for the incoming request and sees the 'Expect' header - server performs some (unspecified, app-specific) sort of validation of the request based on the available headers, knowing that it does not yet have the actual POST request body - server sends either an HTTP 100 Continue response or an HTTP 417 Expectation Failed response as a signal to the client - client wakes back up and, if it got the 100, sends the actual request body. - server processes the complete request, which now has both headers *and* a request body. - server sends response body back to client - client is done! The problem is that we would need to hook in *between* the processing of the headers and the return of the 100 or 417 status... but our PHP code isn't running yet, because we don't get initialized until the entire request body has been read and processed. I haven't tested for sure, but most likely either the header gets ignored, or Apache/PHP send back a 100 under more or less all circumstances. Now, even if we did have a way to process it, I'm not sure how useful it would be. Validation of login state, user permissions, and data validity will usually be dependent on parameters that are typically sent in the POST body, so they wouldn't be available yet before the request body has come through. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l