Hi!
I'm maintaining many bots on Hungarian Wikipedia, they are written in C# using DotNetWikiBot. Lately I randomly get 417 errors from the server (for example at login, at saving pages). If I repeat the request caused 417 again a sec later, it probably works. (Formerly there were no problems at all.) The problem exists using cable connection at home, and the university's network. I haven't found any useful information about 417 on the net, how to avoid it.
Could you give me some information?
Thanks, Dani
2009/2/14 Tar Dániel bdanee88@gmail.com:
Hi!
I'm maintaining many bots on Hungarian Wikipedia, they are written in C# using DotNetWikiBot. Lately I randomly get 417 errors from the server (for example at login, at saving pages). If I repeat the request caused 417 again a sec later, it probably works. (Formerly there were no problems at all.) The problem exists using cable connection at home, and the university's network. I haven't found any useful information about 417 on the net, how to avoid it.
Could you give me some information?
Googling "417 Expectation Failed" (Wikipedia gave me the text to go with that status code) gave me some rough descriptions of what the error means. Apparently you sent an "Expect" command to the server that it couldn't comply with - does the error message give any details about what the "Expect" was? It sounds like it's probably a bug with DotNetWikiBot, so you should contact the author.
On Sat, Feb 14, 2009 at 12:04 PM, Tar Dániel bdanee88@gmail.com wrote:
I'm maintaining many bots on Hungarian Wikipedia, they are written in C# using DotNetWikiBot. Lately I randomly get 417 errors from the server (for example at login, at saving pages). If I repeat the request caused 417 again a sec later, it probably works. (Formerly there were no problems at all.) The problem exists using cable connection at home, and the university's network. I haven't found any useful information about 417 on the net, how to avoid it.
AFAIK, a new version of Squid is partially rolled out, and this new version appears to reject Expect headers. From the HTTP/1.1 standard:
"A server that does not understand or is unable to comply with any of the expectation values in the Expect field of a request MUST respond with appropriate error status. The server MUST respond with a 417 (Expectation Failed) status if any of the expectations cannot be met or, if there are other problems with the request, some other 4xx status.
"This header field is defined with extensible syntax to allow for future extensions. If a server receives a request containing an Expect field that includes an expectation-extension that it does not support, it MUST respond with a 417 (Expectation Failed) status. "
It might be something like: Squid doesn't understand any Expect headers, so the new version returns 417 errors whenever an Expect header is sent. Stop sending Expect headers and the problem will go away.
2009/2/15 Aryeh Gregor <Simetrical+wikilist@gmail.comSimetrical%2Bwikilist@gmail.com
On Sat, Feb 14, 2009 at 12:04 PM, Tar Dániel bdanee88@gmail.com wrote:
I'm maintaining many bots on Hungarian Wikipedia, they are written in C# using DotNetWikiBot. Lately I randomly get 417 errors from the server (for example at login,
at
saving pages). If I repeat the request caused 417 again a sec later, it probably works. (Formerly there were no problems at all.) The problem
exists
using cable connection at home, and the university's network. I haven't found any useful information about 417 on the net, how to avoid it.
AFAIK, a new version of Squid is partially rolled out, and this new version appears to reject Expect headers. From the HTTP/1.1 standard:
"A server that does not understand or is unable to comply with any of the expectation values in the Expect field of a request MUST respond with appropriate error status. The server MUST respond with a 417 (Expectation Failed) status if any of the expectations cannot be met or, if there are other problems with the request, some other 4xx status.
"This header field is defined with extensible syntax to allow for future extensions. If a server receives a request containing an Expect field that includes an expectation-extension that it does not support, it MUST respond with a 417 (Expectation Failed) status. "
It might be something like: Squid doesn't understand any Expect headers, so the new version returns 417 errors whenever an Expect header is sent. Stop sending Expect headers and the problem will go away.
After your great description, I've found the answer (it sended 100-continue expectation in the header, I had to change the ProtocolVersion to prevent this). I'll contact the author of DotNetWikiBot with the fix. Thanks again!
Dani
wikitech-l@lists.wikimedia.org