Re: [Jolie-devel] HTTP URI UTF-8 parsing
A service-oriented programming language.
Brought to you by:
fmontesi
From: Fabrizio M. <fam...@gm...> - 2015-03-14 21:32:25
|
Woohoo! :-) That's great, so basically we "only" got a more stable chunk parsing code. Which was needed. Thanks Matthias! On Sat, Mar 14, 2015 at 10:14 PM, Matthias Dieter Wallnöfer < mat...@ya...> wrote: > I have googled around the Web and I think we are done, since this > problem is due to a limitation in curl: > http://curl.haxx.se/mail/lib-2009-10/0310.html. > > This means that it is client's responsability to escape special > characters in URLs. I have done some testing in various webbrowsers and > they perform the necessary conversions. > > Hence this issue can be considered fixed :). > > Cheers, > Matthias > > Fabrizio Montesi schrieb: > > Shouldn't we use UTF-8 only for the headers and then whatever is > > dictacted by the headers for the rest? > > > > - F > > > > On Tue, Mar 10, 2015 at 7:44 PM, Matthias Dieter Wallnöfer > > <mat...@ya... <mailto:mat...@ya...>> > wrote: > > > > Hi list, > > > > Jolie's HTTP module has the limitation, that it currently does not > > recognise UTF-8 characters in HTTP URIs, which today is standard. > > Looking at the HTTP scanner I noticed that we always parse as ASCII. > > > > I have tried to introduce a UTF-8 reader on top of the InputStream > which > > seems to partially work: one big issue which I came across is the > chunk > > parsing code. > > > > I know that this is a tricky part. Previously I tried a reconversion > in > > the HttpParser with no success, so I think it needs to be parsed > > correctly already at the beginning. > > > > > Exception in thread "main.ol-JolieThread-42" > > java.lang.NumberFormatException: For input string: "?xml" > > > at > > > java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) > > > at java.lang.Integer.parseInt(Integer.java:492) > > > at jolie.net.http.HttpParser.readContent(HttpParser.java:290) > > > at jolie.net.http.HttpParser.parse(HttpParser.java:352) > > > at > jolie.net.HttpProtocol.recv_internal(HttpProtocol.java:1236) > > > at jolie.net.HttpProtocol.recv(HttpProtocol.java:1344) > > > at > > jolie.net.SocketCommChannel.recvImpl(SocketCommChannel.java:94) > > > at jolie.net.CommChannel.recv(CommChannel.java:198) > > > at > > > jolie.net.AbstractCommChannel$ResponseReceiver.run(AbstractCommChannel.java:227) > > > at > > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > > > at > > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > > > at java.lang.Thread.run(Thread.java:745) > > > Exception in thread "main.ol-JolieThread-29" > > java.lang.IndexOutOfBoundsException > > > at > > sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:92) > > > at > > > jolie.net.PreBufferedInputStream.read(PreBufferedInputStream.java:135) > > > at > jolie.net.http.HttpParser.blockingRead(HttpParser.java:235) > > > at jolie.net.http.HttpParser.readContent(HttpParser.java:296) > > > at jolie.net.http.HttpParser.parse(HttpParser.java:352) > > > at > jolie.net.HttpProtocol.recv_internal(HttpProtocol.java:1236) > > > at jolie.net.HttpProtocol.recv(HttpProtocol.java:1344) > > > at > > jolie.net.SocketCommChannel.recvImpl(SocketCommChannel.java:94) > > > at jolie.net.CommChannel.recv(CommChannel.java:198) > > > at > > > jolie.net.AbstractCommChannel$ResponseReceiver.run(AbstractCommChannel.java:227) > > > at > > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > > > at > > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > > > at java.lang.Thread.run(Thread.java:745) > > > > Cheers, > > Matthias > > > > > ------------------------------------------------------------------------------ > > Dive into the World of Parallel Programming The Go Parallel Website, > > sponsored > > by Intel and developed in partnership with Slashdot Media, is your > > hub for all > > things parallel software development, from weekly thought leadership > > blogs to > > news, videos, case studies, tutorials and more. Take a look and join > the > > conversation now. http://goparallel.sourceforge.net/ > > _______________________________________________ > > Jolie-devel mailing list > > Jol...@li... > > <mailto:Jol...@li...> > > https://lists.sourceforge.net/lists/listinfo/jolie-devel > > > > > > |