Russell Blau wrote:
I've been testing my client code on test.wikipedia.org and having problems, but I can't tell whether it is a problem in my code, in the API, or on the testwiki server.
I submitted an edit to a user page using the following body in the POST request to http://test.wikipedia.org/w/api.php (I've broken out the body into key=value pairs to make it somewhat more readable, but there were no line breaks in the body as submitted via http):
maxlag=5& title=User%3AR%27n%27B%2Ftest& text=Further+test+of+page+revision+using+API.& format=json& recreate=& basetimestamp=2008-06-04T19%3A40%3A58Z& summary=test+revision+again& token=0a2b0e1b8d6cea730e7802b900476fa0%2B%5C& action=edit& minor=
This request returned an HTTP 500 status code with an empty response body; however, the edit was successful on the wiki server. (See http://test.wikipedia.org/wiki/User:R%27n%27B/Test) Any ideas why I would be getting this 500 status code instead of the expected JSON response text?
Russ Blau
Mediawiki-api mailing list Mediawiki-api@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
Me, Bryan and another user (who I do not recall the name of, sorry) have also encountered this problem. It was reported via the #wikimedia-tech IRC channel, although I am unsure of whether it was noted or acted upon. As far as I am aware no bugzilla entry was opened either. The edit does still go through, although it is essential that data is returned for any bot to be programmed in a reasonably effective way.
Forwarding this to wikitech-l for further investigation.
MinuteElectron.
MinuteElectron schrieb:
maxlag=5& title=User%3AR%27n%27B%2Ftest& text=Further+test+of+page+revision+using+API.& format=json& recreate=& basetimestamp=2008-06-04T19%3A40%3A58Z& summary=test+revision+again& token=0a2b0e1b8d6cea730e7802b900476fa0%2B%5C& action=edit& minor=
This request returned an HTTP 500 status code with an empty response body; however, the edit was successful on the wiki server. (See http://test.wikipedia.org/wiki/User:R%27n%27B/Test) Any ideas why I would be getting this 500 status code instead of the expected JSON response text?
I suspect it are the +es in the "text" field, AFAIR these should be %20, right?
Marco
Marco Schuster wrote:
I suspect it are the +es in the "text" field, AFAIR these should be %20, right?
Perhaps; " " may be encoded as "+" in URL query strings, and most URL encoding functions do this. But in post strings maybe "+" is not acceptable. I will look to see if your suggestion fixes this.
MinuteElectron.
wikitech-l@lists.wikimedia.org