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

[docs] Note StrictSlash re-direct behaviour #308 #321

Merged
merged 2 commits into from
Dec 2, 2017

Conversation

elithrar
Copy link
Contributor

@elithrar elithrar commented Dec 2, 2017

  • StrictSlash enabled routes return a 301 to the client
  • As per the HTTP standards, non-idempotent methods, such as POST or PUT, will be followed with a GET by the client
  • Users should use middleware if they wish to change this behaviour to return a HTTP 308.

Addresses #308

* StrictSlash enabled routes return a 301 to the client
* As per the HTTP standards, non-idempotent methods, such as POST or PUT, will be followed with a GET by the client
* Users should use middleware if they wish to change this behaviour to return a HTTP 308.
@elithrar elithrar self-assigned this Dec 2, 2017
@elithrar elithrar requested a review from kisielk December 2, 2017 19:50
mux.go Outdated
@@ -164,13 +164,18 @@ func (r *Router) GetRoute(name string) *Route {
// StrictSlash defines the trailing slash behavior for new routes. The initial
// value is false.
//
// When true, if the route path is "/path/", accessing "/path" will redirect
// When true, if the route path is "/path/", accessing "/path" will perform a redirect
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to fix. Can't do that in GitHub.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Introduced a space and can’t edit my branch via the web UI (not at my laptop) 😉

@kisielk
Copy link
Contributor

kisielk commented Dec 2, 2017

Addresses #308

Interesting numerical coincidence :)

@kisielk kisielk merged commit c572efe into master Dec 2, 2017
@elithrar
Copy link
Contributor Author

elithrar commented Dec 2, 2017

🙌🏼

@elithrar elithrar deleted the elithrar/strict-slash-301-docs branch December 2, 2017 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants