Server received a HTTP request which was not a GET

Forum Home Forum Home > Construct 2 Development > Javascript SDK development
 Post Reply Post Reply
Author
3,321 Rep
Post Options Post Options   Quote wgfunstorm Quote  Post ReplyReply Direct Link To This Post Topic: Server received a HTTP request which was not a GET
    Posted: 10 Feb 2012 at 12:41am
A number of people have reported receiving the following error when running a project using my Playtomic plugin. I have been sent projects that cause the error to appear, but all my attempts to reproduce it locally have failed in all browsers. The projects that are causing them errors run perfectly fine for me.

The error msg is also strange to me because when I check the network connections log in Chrome, every single Playtomic request is a GET. Hmmm.

Can you think of anything that would cause the error to appear on one user's machine but not another? Some sort of security setting perhaps?


---------------------------
Construct 2 Check failure
---------------------------
Check failure! This is probably a bug:

Server received a HTTP request which was not a GET - this is not supported

Condition: pRequest->Verb == HttpVerbGET
File: HttpFileServer.cpp
Line: 195
Function: void __cdecl HttpFileServer::ServerThread(void)
Build: release 78 (64-bit) checked
Component: HTML5 exporter
(Last Win32 error: 0)

[...]
|
Back to Top

Scirra Developer
81,259 Rep
Post Options Post Options   Quote Ashley Quote  Post ReplyReply Direct Link To This Post Posted: 10 Feb 2012 at 3:14pm
Construct 2 starts its own HTTP server for previewing, and it only supports GET requests. So if for example in preview mode you POST some data to the localhost server, you'll throw up that error. There's actually a whole bunch of HTTP "verbs", ranging from OPTIONS, HEAD, PUT, DELETE... none of them are supported.

Since it seems to have annoyed a few people I've simply removed the check from the next build. The server will return 404 not found for any non-GET requests.
Back to Top
3,321 Rep
Post Options Post Options   Quote wgfunstorm Quote  Post ReplyReply Direct Link To This Post Posted: 11 Feb 2012 at 2:32pm
Thanks for the update, I know this is totally my fault. So thanks for taking the time for that.

After some further digging, it now does appear like Playtomic relies upon POST to send data (eg leaderboards). The funny thing is I'm still not getting the error. When I run the project it accepts POST and OPTIONS just fine which is how it slipped by me unnoticed.



So unfortunately while it looks like the update will make the error message less jarring, as long as the request is rejected the plugin remains broken.

Correct me if I'm wrong, it should work if they export & upload their projects to an external server that supports POST etc? Guess I'll just have to update the tutorial to with another step to 'not-so-easily add leaderboards'
|
Back to Top
3,321 Rep
Post Options Post Options   Quote wgfunstorm Quote  Post ReplyReply Direct Link To This Post Posted: 13 Feb 2012 at 5:48pm
Bump. Any thoughts?
|
Back to Top
5,380 Rep
Post Options Post Options   Quote smitchell Quote  Post ReplyReply Direct Link To This Post Posted: 13 Feb 2012 at 9:30pm
@wgfunstorm, The release that cam out today was supposed to fix this. Check it out with the latest copy..
In memory of flash :'(
Back to Top

Scirra Developer
81,259 Rep
Post Options Post Options   Quote Ashley Quote  Post ReplyReply Direct Link To This Post Posted: 13 Feb 2012 at 9:33pm
Have you tried r79? I made a change which was relevant.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down