parsed = true;
String body = getBody();
location = null;
if (body != null) {
StringReader stringReader = new StringReader(body);
StructuredFieldParser parser = new StructuredFieldParser(stringReader);
try {
// From RFC2017 3.1
/*
* Extraction of the URL string from the URL-parameter is even simpler:
* The enclosing quotes and any linear whitespace are removed and the
* remaining material is the URL string.
* Read more: http://www.faqs.org/rfcs/rfc2017.html#ixzz0aufO9nRL
*/
location = parser.parse().replaceAll("\\s", "");
} catch (ParseException ex) {
parseException = ex;
}
}
}