Skip to content

Commit

Permalink
Updating URL parser
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidwork committed Jan 30, 2017
1 parent 278dd80 commit 5932b82
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/renderers.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function sanitize (arg) {
renderers.set("text/csv", (arg, req, headers) => {
req.headers.accept = "text/csv";
headers["content-type"] = "text/csv";
headers["content-disposition"] = "attachment; filename=\"" + req.parsed.pathname.replace(/.*\//g, "").replace(/\..*/, "_") + req.parsed.search.replace("?", "").replace(/\&|=/g, "_") + ".csv\"";
headers["content-disposition"] = "attachment; filename=\"" + req.parsed.pathname.replace(/.*\//g, "").replace(/\..*/, "_") + (req.parsed.search || "").replace("?", "").replace(/\&|=/g, "_") + ".csv\"";

return csv.encode(arg);
});
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tenso",
"description": "Tensō is an elastic REST API gateway for node.js",
"version": "4.3.9",
"version": "4.3.10",
"homepage": "http://avoidwork.github.io/tenso",
"author": "Jason Mulligan <[email protected]>",
"repository": {
Expand Down Expand Up @@ -45,7 +45,7 @@
"tiny-merge": "~1.0.0",
"tiny-uuid4": "~1.0.1",
"tiny-xml": "~1.0.6",
"turtle.io": "~7.4.1",
"turtle.io": "~7.4.4",
"uws": "~0.7.0",
"yamljs": "~0.2.8"
},
Expand Down

0 comments on commit 5932b82

Please sign in to comment.