Skip to content

Commit

Permalink
Move request slug from path to query
Browse files Browse the repository at this point in the history
This prevents the airlift HTTP server from logging the slug in the http request log.
  • Loading branch information
aweisberg authored and rschlussel committed Sep 5, 2019
1 parent 6c1aab7 commit 67efdcf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -579,9 +579,9 @@ private synchronized URI createNextResultsUri(String scheme, UriInfo uriInfo)
.scheme(scheme)
.replacePath("/v1/statement")
.path(queryId.toString())
.path(slug)
.path(String.valueOf(resultId.incrementAndGet()))
.replaceQuery("")
.queryParam("slug", slug)
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,12 @@ public Response createQuery(
}

@GET
@Path("{queryId}/{slug}/{token}")
@Path("{queryId}/{token}")
@Produces(MediaType.APPLICATION_JSON)
public void getQueryResults(
@PathParam("queryId") QueryId queryId,
@PathParam("slug") String slug,
@PathParam("token") long token,
@QueryParam("slug") String slug,
@QueryParam("maxWait") Duration maxWait,
@QueryParam("targetResultSize") DataSize targetResultSize,
@HeaderParam(X_FORWARDED_PROTO) String proto,
Expand Down Expand Up @@ -274,12 +274,12 @@ private static Response toResponse(Query query, QueryResults queryResults)
}

@DELETE
@Path("{queryId}/{slug}/{token}")
@Path("{queryId}/{token}")
@Produces(MediaType.APPLICATION_JSON)
public Response cancelQuery(
@PathParam("queryId") QueryId queryId,
@PathParam("slug") String slug,
@PathParam("token") long token)
@PathParam("token") long token,
@QueryParam("slug") String slug)
{
Query query = getQuery(queryId, slug);
if (query == null) {
Expand Down

0 comments on commit 67efdcf

Please sign in to comment.