Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse Out Querystrings? #3

Open
No9 opened this issue Jul 16, 2013 · 4 comments
Open

Parse Out Querystrings? #3

No9 opened this issue Jul 16, 2013 · 4 comments

Comments

@No9
Copy link

No9 commented Jul 16, 2013

If you try and get a url that also includes a querystring then level-static will try and get the full document with the querystring from the database.

Is this intentional?

I can see use cases for and against but I was wondering what the expected behavior should be and if a patch or options are required?

@dominictarr
Copy link
Owner

No, it's not intensional. patch welcome.

maybe that could be passed to an optional user supplied function?

@juliangruber
Copy link

maybe you could make use of https://github.com/substack/level-query

@dominictarr
Copy link
Owner

@juliangruber that is a completely different thing, for doing search queries.
level-static is normally raw files, which arn't indexed like that.

@No9
Copy link
Author

No9 commented Jul 18, 2013

k i have started on this should land later
Test looks like :

tape('url parser option', function (t) {
var opt = {};
  opt.urlparser = function(url){
    return url.split('?')[0]
  }

var server = http.createServer(static(db, opts)).listen(port, function () {
});

@No9 No9 mentioned this issue Jul 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants