GoogleCloudPlatform / webapp2

webapp2 is a framework for Google App Engine
https://webapp2.readthedocs.org
Other
141 stars 63 forks source link

Get Request Fails in Firefox, but not Edge, Chrome, Opera #138

Closed amrosado closed 6 years ago

amrosado commented 6 years ago

I'm experiencing some problems with using webapp2 where I'm noticing I cannot successfully complete a GET request to a certain URL in firefox, but I can with all other major browsers. In particular, it appears as if my GET method in webapp2 is not being called at all in firefox and it always returns a 404 despite navigating to the same URL in other browsers. From firefox the request headers:

Host: localhost:8080
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Upgrade-Insecure-Requests: 1
Cache-Control: max-age=0

And response headers:

HTTP/1.1 404 Not Found
Connection: Keep-Alive
Server: Embedthis-http
Cache-Control: no-cache
Date: Mon, 24 Sep 2018 14:41:55 GMT
Content-Length: 183
Keep-Alive: timeout=60, max=199

The same url request in chrome:

GET /api/auth/login HTTP/1.1
Host: localhost:8080
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
DNT: 1

And response:

HTTP/1.1 200 OK
access-control-expose-headers: Access-Token, Uid
cache-control: no-cache
access-control-allow-credentials: true
access-control-allow-origin: *
access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept
content-type: application/json; charset=utf-8
Content-Length: 30
Server: Development/2.0
Date: Mon, 24 Sep 2018 14:43:42 GMT

I've tried changing various headers, etc. but when I make the request from firefox I am not getting to a point where the development server even sees a request from the firefox browser. Based on firefox's development console I don't believe any other requests are being made to development server.

amrosado commented 6 years ago

I've also tried using the GoogleAppEngine development server with django instead of webapp2 and it also seems this same problem also occurs with a basic django configuration. I've deployed other applications in a production mode using GoogleAppEngine, but it appears this production deployment is not impacted by this problem.

amrosado commented 6 years ago

It appears my problem was with my app.yaml file url pattern and for some reason the request would work from other browsers, but not firefox.