[gwt-contrib] Re: Fix com.google.gwt.http.client.UrlBuilder to encode the query string using URL.encodeQueryString(). (issue1586804)

2011-11-08 Thread t . broyer

I'm a bit late but:

Note that it fixes
http://code.google.com/p/google-web-toolkit/issues/detail?id=4940



http://gwt-code-reviews.appspot.com/1586804/diff/1/user/src/com/google/gwt/http/client/UrlBuilder.java
File user/src/com/google/gwt/http/client/UrlBuilder.java (right):

http://gwt-code-reviews.appspot.com/1586804/diff/1/user/src/com/google/gwt/http/client/UrlBuilder.java#newcode53
user/src/com/google/gwt/http/client/UrlBuilder.java:53:
url.append(URL.encode(protocol)).append(://);
Maybe should rather be URL.encodeComponent(protocol, false), or, as it's
deprecated, URL.encodePathComponent(protocol).

http://gwt-code-reviews.appspot.com/1586804/diff/1/user/src/com/google/gwt/http/client/UrlBuilder.java#newcode76
user/src/com/google/gwt/http/client/UrlBuilder.java:76:
.append(URL.encodeQueryString(entry.getKey()))
encodePathSegment is faster, as is won't change %20 to + (which is done
in a second pass).
As an alternative, if we really want +s for spaces in the query-string,
appending to another StringBuilder using encodePathSegment, and then
replacing /%20/g with + before appending to the 'url' StringBuilder
would be faster than encodeQueryString as done here.
But maybe this is premature optimization?

http://gwt-code-reviews.appspot.com/1586804/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Fix com.google.gwt.http.client.UrlBuilder to encode the query string using URL.encodeQueryString(). (issue1586804)

2011-11-08 Thread jlabanca

LGTM

http://gwt-code-reviews.appspot.com/1586804/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: HTTP query string when tested in development mode

2010-09-27 Thread volkan özdemir
2010/9/26, hezjing hezj...@gmail.com:
 Thanks to Philippe,

 The solution is simply rename the hosted page *.html to *.jsp

 See
 https://groups.google.com/group/google-appengine-java/browse_thread/thread/46240ee12dc856be
 https://groups.google.com/group/google-appengine-java/browse_thread/thread/46240ee12dc856be

 On Tue, Sep 21, 2010 at 2:07 PM, hezjing hezj...@gmail.com wrote:

 Hi

 Apparently it seems that it is the Google App Engine that is causing this
 problem.

 The servlet filter is able to obtain the query string when I tested in
 GWT
 application without the App Engine settings. I'm also new to App Engine,
 do
 you know why the servlet filter is not working with App Engine?



 On Sun, Sep 19, 2010 at 4:30 PM, hezjing hezj...@gmail.com wrote:

 Hi rjcarr

 The query string is still null after I set to
 ...Dummy.html?debug=2param=2gwt.codesvr=127.0.0.1:9997http://127.0.0.1:/Property123.html?gwt.codesvr=127.0.0.1:9997
 .

 The same problem occurs with the default development mode URL like
 http://127.0.0.1:/Dummy.html?gwt.codesvr=127.0.0.1:9997,
 I'm just thinking could this because of the browser plugin that causes
 this problem?



 On Sun, Sep 19, 2010 at 10:10 AM, rjcarr rjc...@gmail.com wrote:

 From what you've posted it doesn't look like a valid URL.  A query
 string, as far as I know, is a series of key=value pairs separated by
 .  You posted this:

 http://127.0.0.1:/Dummy.html?debugparam2gwt.codesvr=127.0.0.1:9997

 Which doesn't look correctly formed.  Try this:


 http://127.0.0.1:/Dummy.html?debug=2param=2gwt.codesvr=127.0.0.1:9997

 --
 You received this message because you are subscribed to the Google
 Groups
 Google Web Toolkit group.
 To post to this group, send email to
 google-web-toolkit@googlegroups.com
 .
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.




 --

 Hez




 --

 Hez




 --

 Hez

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.




-- 
www.webvolkan.blogspot.com
volkan özdemirintelefon numarası
05319953770

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: HTTP query string when tested in development mode

2010-09-26 Thread hezjing
Thanks to Philippe,

The solution is simply rename the hosted page *.html to *.jsp

See
https://groups.google.com/group/google-appengine-java/browse_thread/thread/46240ee12dc856be
https://groups.google.com/group/google-appengine-java/browse_thread/thread/46240ee12dc856be

On Tue, Sep 21, 2010 at 2:07 PM, hezjing hezj...@gmail.com wrote:

 Hi

 Apparently it seems that it is the Google App Engine that is causing this
 problem.

 The servlet filter is able to obtain the query string when I tested in GWT
 application without the App Engine settings. I'm also new to App Engine, do
 you know why the servlet filter is not working with App Engine?



 On Sun, Sep 19, 2010 at 4:30 PM, hezjing hezj...@gmail.com wrote:

 Hi rjcarr

 The query string is still null after I set to
 ...Dummy.html?debug=2param=2gwt.codesvr=127.0.0.1:9997http://127.0.0.1:/Property123.html?gwt.codesvr=127.0.0.1:9997
 .

 The same problem occurs with the default development mode URL like
 http://127.0.0.1:/Dummy.html?gwt.codesvr=127.0.0.1:9997,
 I'm just thinking could this because of the browser plugin that causes
 this problem?



 On Sun, Sep 19, 2010 at 10:10 AM, rjcarr rjc...@gmail.com wrote:

 From what you've posted it doesn't look like a valid URL.  A query
 string, as far as I know, is a series of key=value pairs separated by
 .  You posted this:

 http://127.0.0.1:/Dummy.html?debugparam2gwt.codesvr=127.0.0.1:9997

 Which doesn't look correctly formed.  Try this:


 http://127.0.0.1:/Dummy.html?debug=2param=2gwt.codesvr=127.0.0.1:9997

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com
 .
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.




 --

 Hez




 --

 Hez




-- 

Hez

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: HTTP query string when tested in development mode

2010-09-21 Thread hezjing
Hi

Apparently it seems that it is the Google App Engine that is causing this
problem.

The servlet filter is able to obtain the query string when I tested in GWT
application without the App Engine settings. I'm also new to App Engine, do
you know why the servlet filter is not working with App Engine?



On Sun, Sep 19, 2010 at 4:30 PM, hezjing hezj...@gmail.com wrote:

 Hi rjcarr

 The query string is still null after I set to
 ...Dummy.html?debug=2param=2gwt.codesvr=127.0.0.1:9997http://127.0.0.1:/Property123.html?gwt.codesvr=127.0.0.1:9997
 .

 The same problem occurs with the default development mode URL like
 http://127.0.0.1:/Dummy.html?gwt.codesvr=127.0.0.1:9997,
 I'm just thinking could this because of the browser plugin that causes this
 problem?



 On Sun, Sep 19, 2010 at 10:10 AM, rjcarr rjc...@gmail.com wrote:

 From what you've posted it doesn't look like a valid URL.  A query
 string, as far as I know, is a series of key=value pairs separated by
 .  You posted this:

 http://127.0.0.1:/Dummy.html?debugparam2gwt.codesvr=127.0.0.1:9997

 Which doesn't look correctly formed.  Try this:


 http://127.0.0.1:/Dummy.html?debug=2param=2gwt.codesvr=127.0.0.1:9997

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.




 --

 Hez




-- 

Hez

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: HTTP query string when tested in development mode

2010-09-19 Thread hezjing
Hi rjcarr

The query string is still null after I set to ...Dummy.html?debug=2param=2
gwt.codesvr=127.0.0.1:9997http://127.0.0.1:/Property123.html?gwt.codesvr=127.0.0.1:9997
.

The same problem occurs with the default development mode URL like
http://127.0.0.1:/Dummy.html?gwt.codesvr=127.0.0.1:9997,
I'm just thinking could this because of the browser plugin that causes this
problem?



On Sun, Sep 19, 2010 at 10:10 AM, rjcarr rjc...@gmail.com wrote:

 From what you've posted it doesn't look like a valid URL.  A query
 string, as far as I know, is a series of key=value pairs separated by
 .  You posted this:

 http://127.0.0.1:/Dummy.html?debugparam2gwt.codesvr=127.0.0.1:9997

 Which doesn't look correctly formed.  Try this:

 http://127.0.0.1:/Dummy.html?debug=2param=2gwt.codesvr=127.0.0.1:9997

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.




-- 

Hez

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



HTTP query string when tested in development mode

2010-09-18 Thread hezjing
Hi

I have the following servlet filter and mapped to the URL pattern /*

public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
HttpServletRequest req = (HttpServletRequest) request;
// query is null?
String query = req.getQueryString();
}

When I started the GWT application in development mode:
http://127.0.0.1:/Dummy.html?debugparam2gwt.codesvr=127.0.0.1:9997http://127.0.0.1:/Dummy.html?debuggwt.codesvr=127.0.0.1:9997,
the
query string is always empty (null).

Do you know why?


-- 

Hez

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: HTTP query string when tested in development mode

2010-09-18 Thread rjcarr
From what you've posted it doesn't look like a valid URL.  A query
string, as far as I know, is a series of key=value pairs separated by
.  You posted this:

http://127.0.0.1:/Dummy.html?debugparam2gwt.codesvr=127.0.0.1:9997

Which doesn't look correctly formed.  Try this:

http://127.0.0.1:/Dummy.html?debug=2param=2gwt.codesvr=127.0.0.1:9997

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



[gwt-contrib] Re: Fix for issue 3374 (URL.encodeComponent limited to query-string uses)

2009-10-27 Thread t . broyer

For those following progress on this, or finding this issue later on;
and to not leave a comment unanswered:


http://gwt-code-reviews.appspot.com/87806/diff/1/2
File user/src/com/google/gwt/http/client/URL.java (right):

http://gwt-code-reviews.appspot.com/87806/diff/1/2#newcode170
Line 170: * characters:blockquote
On 2009/10/26 20:30:45, Ray Ryan wrote:
 Wait, + escaping is controlled by queryStringSpaces, right? Should
mention that
 here.

Only space (\u0020) escaping is controlled by queryStringSpaces
(producing either a + or %20). + chars in the input are always
escaped to %2B.
(and when decoding, %2B is always decoded to a + while + can either
be decoded to a space or left as-is).

http://gwt-code-reviews.appspot.com/87806

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Fix for issue 3374 (URL.encodeComponent limited to query-string uses)

2009-10-26 Thread Ray Ryan
Oh, I did get the javadoc wrong, didn't I? I'll leave it alone.

On Mon, Oct 26, 2009 at 1:30 PM, rj...@google.com wrote:

 Thank you for this, and for your incredible patience. I'll submit it
 this afternoon.

 One JavaDoc nit below, which I'll address. Please say something if I'm
 confused there.


 http://gwt-code-reviews.appspot.com/87806/diff/1/2
 File user/src/com/google/gwt/http/client/URL.java (right):

 http://gwt-code-reviews.appspot.com/87806/diff/1/2#newcode170
 Line 170: * characters:blockquote
 Wait, + escaping is controlled by queryStringSpaces, right? Should
 mention that here.


 http://gwt-code-reviews.appspot.com/87806


--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



query string

2009-08-31 Thread Juergen Saar
Hi,

how can I get the Query-Arguments from my URL on EntryPoint?

Thanx
-jsaar-

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: query string

2009-08-31 Thread Thomas Broyer



On 31 août, 09:23, Juergen Saar duddelfud...@googlemail.com wrote:
 Hi,

 how can I get the Query-Arguments from my URL on EntryPoint?

Window.Location.getQueryString()
http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/user/client/Window.Location.html#getQueryString()

Have a look at the Window.Location.getParameter() and
Window.Location.getParameterMap() too if you use application/x-www-
form-urlencoded-like query strings (i.e. key1=value1key2=value2)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Tighten up query string parsing for locale value in I18N.gwt.xml

2009-02-06 Thread Scott Blum
You could also check that the preceding character is '?' or ''.  I'm not
sure in this context if it can actually be at pos 0 or not.

On Thu, Feb 5, 2009 at 7:55 PM, zun...@google.com wrote:


 Reviewers: jat,

 Description:
 Tighten up query string parsing for locale value in I18N.gwt.xml.
 Potentially, another string might have the substring locale embedded
 somehow. This is just a minor improvement and doesn't handle every case.

 Please review this at http://gwt-code-reviews.appspot.com/2802

 Affected files:
   user/src/com/google/gwt/i18n/I18N.gwt.xml


 Index: user/src/com/google/gwt/i18n/I18N.gwt.xml
 ===
 --- user/src/com/google/gwt/i18n/I18N.gwt.xml   (revision 4644)
 +++ user/src/com/google/gwt/i18n/I18N.gwt.xml   (working copy)
 @@ -27,7 +27,7 @@
// Look for the locale as a url argument
if (locale == null) {
  var args = location.search;
 -var startLang = args.indexOf(locale);
 +var startLang = args.indexOf(locale=);
  if (startLang = 0) {
var language = args.substring(startLang);
var begin = language.indexOf(=) + 1;



 


--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Tighten up query string parsing for locale value in I18N.gwt.xml

2009-02-05 Thread jat

LGTM

http://gwt-code-reviews.appspot.com/2802

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---