Server received a HTTP request which was not a GET

For developers using the Construct 2 Javascript SDK

Post » Fri Feb 10, 2012 12:41 am

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)

[...]
B
22
S
9
G
5
Posts: 122
Reputation: 5,386

Post » Fri Feb 10, 2012 3:14 pm

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.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Sat Feb 11, 2012 2:32 pm

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'
B
22
S
9
G
5
Posts: 122
Reputation: 5,386

Post » Mon Feb 13, 2012 5:48 pm

Bump. Any thoughts?
B
22
S
9
G
5
Posts: 122
Reputation: 5,386

Post » Mon Feb 13, 2012 9:30 pm

@wgfunstorm, The release that cam out today was supposed to fix this. Check it out with the latest copy..
B
29
S
12
G
7
Posts: 740
Reputation: 7,839

Post » Mon Feb 13, 2012 9:33 pm

Have you tried r79? I made a change which was relevant.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 1 guest