@Override public Charset getCharset() { return Request.this.getCharset(); }
@Override public Charset getCharset() { return Request.this.getCharset(); }
private static Charset getCurrentCharset() { return RequestCycle.get().getRequest().getCharset(); }
private static Charset getCurrentCharset() { return RequestCycle.get().getRequest().getCharset(); }
/** * @param requestCycle * @return the configured encoding or the request's one as default */ private String getEncoding(final IRequestCycle requestCycle) { String encoding = this.encoding; if (Strings.isEmpty(encoding)) { Charset charset = requestCycle.getRequest().getCharset(); if (charset != null) { encoding = charset.name(); } } return encoding; }
/** * @param requestCycle * @return the configured encoding or the request's one as default */ private String getEncoding(final IRequestCycle requestCycle) { String encoding = this.encoding; if (Strings.isEmpty(encoding)) { Charset charset = requestCycle.getRequest().getCharset(); if (charset != null) { encoding = charset.name(); } } return encoding; }
/** * Take URL-encoded query string value, decode it and return HTML-escaped version * * @param s * value to decode * @return URL decoded and HTML escaped value */ private String recode(String s) { String un = UrlDecoder.QUERY_INSTANCE.decode(s, getRequest().getCharset()); return Strings.escapeMarkup(un).toString(); }
/** * Take URL-encoded query string value, decode it and return HTML-escaped version * * @param s * value to decode * @return URL decoded and HTML escaped value */ private String recode(String s) { String un = UrlDecoder.QUERY_INSTANCE.decode(s, getRequest().getCharset()); return Strings.escapeMarkup(un).toString(); }
private CharSequence createCallbackUrl(String subpath) { Url url = Url.parse(urlForListener(requestListener, null).toString()); url.addQueryParameter("path", subpath); return url.toString(getRequest().getCharset()); }
Url url = new Url(request.getCharset()); Url originalUrl = Url.parse(decryptedUrl, request.getCharset());
Url url = new Url(request.getCharset()); Url originalUrl = Url.parse(decryptedUrl, request.getCharset());
@Override public void onRequest() { String path = getRequest().getRequestParameters().getParameterValue("path").toString(); // if (path == null) { // path = getRequestCycle().getPageParameters().getString("path"); // } path = UrlDecoder.QUERY_INSTANCE.decode(path, getRequest().getCharset()); onPathClicked(new Path(path)); } });
OutputStreamWriter out = new OutputStreamWriter(outputStream, request.getCharset()); JSONStringer json = new JSONStringer();
webResponse.setContentType("application/json"); OutputStreamWriter out = new OutputStreamWriter(webResponse.getOutputStream(), getRequest().getCharset()); JSONWriter json = new JSONWriter(out);
webResponse.setContentType("application/json"); OutputStreamWriter out = new OutputStreamWriter(webResponse.getOutputStream(), getRequest().getCharset()); JSONWriter json = new JSONWriter(out);
webResponse.setContentType("application/json"); OutputStreamWriter out = new OutputStreamWriter(webResponse.getOutputStream(), getRequest().getCharset()); JSONWriter json = new JSONWriter(out);