Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
igr committed Aug 3, 2022
1 parent 2c671c2 commit a07090b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/jodd/http/HttpResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ public HttpResponse statusPhrase(final String statusPhrase) {
}

/**
* Parses 'location' header to return the next location or returns {@code null} if location not specified.
* Specification (<a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30">rfc2616</a>)
* says that only absolute path must be provided, however, this does not
* happens in the real world. There a <a href="https://tools.ietf.org/html/rfc7231#section-7.1.2">proposal</a>
* that allows server name etc to be omitted.
* Parses the 'location' header and returns an absolute URL for the provided path. Returns {@code null}
* if no location was specified or throws {@code HttpException} if it was impossible to assemble a valid URL.
* <p>
* <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30">RFC 2616</a> still required an absolute
* URL, whereas RFC 9110 introduced the support for relative paths.
*/
public String location() {
String location = header("location");
Expand Down

0 comments on commit a07090b

Please sign in to comment.