Redirect /job to / and /job/:job/build to /job/:job #104

Merged
reynir merged 5 commits from redirect-job-and-build into main 4 months ago
hannes commented 4 months ago
Owner

replaces #81

replaces #81
hannes added 1 commit 4 months ago
hannes added 1 commit 4 months ago
rand requested changes 4 months ago
rand left a comment

A single potential change depending on semantics of Dream.to_form_urlencoded

let parent = parent ^ "/" in
let url = match Dream.queries req with
| [] -> parent
| xs -> parent ^ (Dream.to_form_urlencoded xs)
rand commented 4 months ago
Poster
Owner

I havn't tested the output of this function, but @reynir prefixes "?" when he uses it https://git.robur.io/robur/builder-web/pulls/80/files

I havn't tested the output of this function, but @reynir prefixes "?" when he uses it https://git.robur.io/robur/builder-web/pulls/80/files
hannes marked this conversation as resolved
hannes added 1 commit 4 months ago
rand added 1 commit 4 months ago
rand added 1 commit 4 months ago
reynir approved these changes 4 months ago
reynir left a comment

There's a corner case not handled correctly, but I think this is good to merge and we can fix that later

let url = match Dream.queries req with
| [] -> parent
| xs -> parent ^ "?" ^ (Dream.to_form_urlencoded xs)
in
Poster
Owner

The query part is allowed to contain /, so this is in (rare) cases wrong

The query part is allowed to contain `/`, so this is in (rare) cases wrong
reynir merged commit e5a2b6fc0e into main 4 months ago
hannes deleted branch redirect-job-and-build 4 months ago

Reviewers

rand requested changes 4 months ago
reynir approved these changes 4 months ago
The pull request has been merged as e5a2b6fc0e.
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.