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
Fail earlier on cache corruptions #6495
Changes from 5 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,15 +15,6 @@ | |
*/ | ||
package okhttp3 | ||
|
||
import java.net.InetAddress | ||
import java.net.MalformedURLException | ||
import java.net.URI | ||
import java.net.URISyntaxException | ||
import java.net.URL | ||
import java.nio.charset.Charset | ||
import java.nio.charset.StandardCharsets.UTF_8 | ||
import java.util.Collections | ||
import java.util.LinkedHashSet | ||
import okhttp3.HttpUrl.Companion.toHttpUrl | ||
import okhttp3.HttpUrl.Companion.toHttpUrlOrNull | ||
import okhttp3.internal.canParseAsIpAddress | ||
|
@@ -34,6 +25,15 @@ import okhttp3.internal.parseHexDigit | |
import okhttp3.internal.publicsuffix.PublicSuffixDatabase | ||
import okhttp3.internal.toCanonicalHost | ||
import okio.Buffer | ||
import java.net.InetAddress | ||
import java.net.MalformedURLException | ||
import java.net.URI | ||
import java.net.URISyntaxException | ||
import java.net.URL | ||
import java.nio.charset.Charset | ||
import java.nio.charset.StandardCharsets.UTF_8 | ||
import java.util.Collections | ||
import java.util.LinkedHashSet | ||
|
||
/** | ||
* A uniform resource locator (URL) with a scheme of either `http` or `https`. Use this class to | ||
|
@@ -1258,7 +1258,7 @@ class HttpUrl internal constructor( | |
this.scheme = base.scheme | ||
} else { | ||
throw IllegalArgumentException( | ||
"Expected URL scheme 'http' or 'https' but no colon was found") | ||
"Expected URL scheme 'http' or 'https' but no scheme was found for $input") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Happy to drop this for PII reasons if there is concern, although as a corrupted url, the debug value seems higher than normal. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Log up to 6 characters? Like |
||
} | ||
|
||
// Authority. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 options here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change
cache failure
tocache corruption
?