Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
|get |/partial_content.txt |range start |0 |range end|4 |
|ensure |response code equals |206 |
|ensure |body has partial file contents|public/partial_content.txt|from|0 |to|4 |
|ensure |response has date |
|get |/partial_content.txt |range start | |range end|6 |
|ensure |response code equals |206 |
|ensure |body has partial file contents|public/partial_content.txt|from|71 |to|76|
|get |/partial_content.txt |range start |4 |range end| |
|ensure |response code equals |206 |
|ensure |body has partial file contents|public/partial_content.txt|from|4 |to|76|
|ensure |response has date |
5 changes: 5 additions & 0 deletions src/main/java/HttpBrowser.java
Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,9 @@ private void storeResponseInfoFrom(HttpResponse response) throws IOException {
private String latestResponseContentAsString() {
return new String(latestResponseContent);
}

public boolean responseHasDate() {
Header responseDate = response.getFirstHeader(HttpHeaders.DATE);
return (responseDate != null) && !("".equals(responseDate.getValue()));
}
}