[Bug 26624] ERR_INVALID_REQ when trying upload a file with API

2011-02-02 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=26624

Mark A. Hershberger m...@everybody.org changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||INVALID

--- Comment #10 from Mark A. Hershberger m...@everybody.org 2011-02-02 
18:32:23 UTC ---
You are not using the curl library correctly.

If you pass $message to as the value for CURLOPT_POSTFIELDS instead of
$query_data it will work.

curl cannot be expected to translate arbitrary PHP data structures into usable
POST data.

I recommend you use a HTTP client library (there are a few mentioned in
http://willnorris.com/2009/03/http-client-library-for-php or you can try
MediaWiki's own Http class (found in HttpFunctions.php).

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
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


[Bug 26624] ERR_INVALID_REQ when trying upload a file with API

2011-01-31 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=26624

Jan Luca j...@jans-seite.de changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |
 AssignedTo|wikibugs-l@lists.wikimedia. |j...@jans-seite.de
   |org |

--- Comment #9 from Jan Luca j...@jans-seite.de 2011-01-31 11:00:04 UTC ---
Created attachment 8071
  -- https://bugzilla.wikimedia.org/attachment.cgi?id=8071
PHP-Script to show error message

Here is a test file for the problem which works with curl.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
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


[Bug 26624] ERR_INVALID_REQ when trying upload a file with API

2011-01-31 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=26624

Jan Luca j...@jans-seite.de changed:

   What|Removed |Added

   Attachment #8071|application/octet-stream|application/x-httpd-php
  mime type||

-- 
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


[Bug 26624] ERR_INVALID_REQ when trying upload a file with API

2011-01-31 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=26624

Jan Luca j...@jans-seite.de changed:

   What|Removed |Added

 AssignedTo|j...@jans-seite.de   |wikibugs-l@lists.wikimedia.
   ||org

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
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


[Bug 26624] ERR_INVALID_REQ when trying upload a file with API

2011-01-28 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=26624

Mark A. Hershberger m...@everybody.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||m...@everybody.org
 Resolution||INVALID

--- Comment #8 from Mark A. Hershberger m...@everybody.org 2011-01-28 
19:43:28 UTC ---
Closing this since a reproducible test case hasn't been provided.  If you want
to re-open it, please provide a test case so that we can reproduce the problem.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
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


[Bug 26624] ERR_INVALID_REQ when trying upload a file with API

2011-01-08 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=26624

--- Comment #6 from Jan Luca j...@jans-seite.de 2011-01-08 15:21:00 UTC ---
I test the request with my local Apache server and there are no problems. I can
read out the parameters ($_POST[...]). 

My problem is reproducable with other input parameters.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
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


[Bug 26624] ERR_INVALID_REQ when trying upload a file with API

2011-01-08 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=26624

--- Comment #7 from Jan Luca j...@jans-seite.de 2011-01-08 15:25:29 UTC ---
The line endings are \r\n, because the file is created in Windows and my text
editor show no mixtures.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
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


[Bug 26624] ERR_INVALID_REQ when trying upload a file with API

2011-01-07 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=26624

--- Comment #1 from Brion Vibber br...@pobox.com 2011-01-07 22:03:55 UTC ---
unknown method, no URL, and ERR_INVALID_REQ all make me suspect that there's a
basic problem with your HTTP request itself: the squid proxy servers which are
Wikimedia's first line of response are giving you a complete rejection, saying
it can't understand what you're telling it even enough to send it to the actual
web servers.


It looks like you're manually constructing an HTTP request from scratch by
mashing strings together. Make absolutely sure that you're doing this
correctly, for instance:

* are all the variables correct?
* are their values actually getting interpolated?
* do you have any issues with mixtures of \r\n and \n? (\r\n should be used at
the line separator, I believe, but unless your code is changing it you'll have
*either* \r\n or \n depending on your OS's file encoding...?

You might for instance try dumping the string and checking it manually before
sending it out. If you get the same, try making your request simpler -- take
out some of those parameters and see what you get. Confirm that you can make an
HTTP request _at all_ with this code, then add parameters back until you see
what's wrong.


However in general, I'd recommend that you go ahead and use some existing HTTP
library that can handle constructing an HTTP request with multipart form
submission data, such as CURL or the PEAR HTTP_Request2 module.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
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


[Bug 26624] ERR_INVALID_REQ when trying upload a file with API

2011-01-07 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=26624

X! soxre...@gmail.com changed:

   What|Removed |Added

 CC||soxre...@gmail.com

--- Comment #2 from X! soxre...@gmail.com 2011-01-07 22:05:32 UTC ---
I am having this same problem, using the regular cURL class in PHP. The
relevant code:
http://code.google.com/p/mw-peachy/source/browse/trunk/Plugins/image.php?r=330#415

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
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


[Bug 26624] ERR_INVALID_REQ when trying upload a file with API

2011-01-07 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=26624

--- Comment #3 from Brion Vibber br...@pobox.com 2011-01-07 22:08:59 UTC ---
(In reply to comment #2)
 I am having this same problem, using the regular cURL class in PHP. The
 relevant code:
 http://code.google.com/p/mw-peachy/source/browse/trunk/Plugins/image.php?r=330#415

Got an exact sequence of commands to reproduce the issue with your code?

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
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


[Bug 26624] ERR_INVALID_REQ when trying upload a file with API

2011-01-07 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=26624

--- Comment #4 from X! soxre...@gmail.com 2011-01-07 22:10:42 UTC ---
Not exactly, it's kind of complex. It also happens about 1 in 100 times, so
it's not easily reproducable. You can get an idea of what API params I'm using.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
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


[Bug 26624] ERR_INVALID_REQ when trying upload a file with API

2011-01-07 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=26624

--- Comment #5 from Brion Vibber br...@pobox.com 2011-01-07 22:18:12 UTC ---
It sounded like the original poster's problem is *every* time rather than 1% of
hits, so this likely isn't the same issue.

1% of the time is more likely to involve occasional bad processing or bugs on
the server end, especially if resubmitting the same request works. That'd be
something that needs to be worked out with server admins.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
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