ga-wdi-boston / team-project

Other
2 stars 39 forks source link

GET /bucket?_=1498667948008 #353

Closed EricLScace closed 7 years ago

EricLScace commented 7 years ago

A GET of this form does not get handled by the router properly, as far as we can see. The breakpoint in the controller is never hit.

We are trying to research a way for the router to ignore the ?_=... string. We haven't found something definitive yet. Suggestions?

EricLScace commented 7 years ago

p.s. we are using node-inspector to debug the controller.

jordanallain commented 7 years ago

what do you mean by a GET of this form?

EricLScace commented 7 years ago

Background:

routes.js statement: .get('/bucket', 'buckets#index')

The URL of the message arriving at the server is specified to be of the form: http://localhost:4741/bucket for an read request from the browser.

What actually gets transmitted is a message to this URL: http://localhost:4741/bucket?_=123456789

The question I am researching is how to write the statement in routes.js that matches a URL, when there is a suffix after the URL (in this example, ?_=123456789) that can be ignored in making a routing decision.

benjimelito commented 7 years ago

One possible solution is to simply get rid of everything from the ? onwards. That url is just a string, and there should be some handy string methods you can throw at it.

EricLScace commented 7 years ago

Yeah, that had occurred to me. Requires digging more into the router code. More on this later.

EricLScace commented 7 years ago

It seems this wasn't a problem. The router has transferred the message to the controller. Now on the next problem.