Modifier and Type | Class and Description |
---|---|
static class |
HttpParser.ParseException
An exception indicating some problem parsing HTPP headers.
|
Modifier | Constructor and Description |
---|---|
private |
HttpParser() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<AuthenticationChallenge> |
getAuthenticationHeaders(java.util.List<java.lang.String> reply,
java.lang.String authenticationHeader)
Extract the authentication headers from the header lines.
|
private static int |
parseChallenge(AuthenticationChallenge challenge,
java.lang.String header,
int from) |
private static void |
parseChallenges(java.util.List<AuthenticationChallenge> challenges,
java.lang.String header) |
static StatusLine |
parseStatusLine(java.lang.String line)
Parse a HTTP response status line.
|
private static java.lang.String |
scanQuotedString(java.lang.String header,
int from,
int[] to) |
private static int |
scanToken(java.lang.String header,
int from) |
private static int |
skipWhiteSpace(java.lang.String header,
int i) |
public static StatusLine parseStatusLine(java.lang.String line) throws HttpParser.ParseException
line
- to parseStatusLine
HttpParser.ParseException
- if the line cannot be parsed or has the wrong HTTP versionpublic static java.util.List<AuthenticationChallenge> getAuthenticationHeaders(java.util.List<java.lang.String> reply, java.lang.String authenticationHeader)
reply
is the raw status line as
received from the server. It is skipped. Line processing stops on the
first empty line thereafter.reply
- The complete (header) lines of the HTTP responseauthenticationHeader
- to look for (including the terminating ':'!)AuthenticationChallenge
s found.private static void parseChallenges(java.util.List<AuthenticationChallenge> challenges, java.lang.String header)
private static int parseChallenge(AuthenticationChallenge challenge, java.lang.String header, int from)
private static int skipWhiteSpace(java.lang.String header, int i)
private static int scanToken(java.lang.String header, int from)
private static java.lang.String scanQuotedString(java.lang.String header, int from, int[] to)