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-13 10:05:15
|
Cool, how are you seeing the low-level chunks? curl? I'd like to use something that is not Jolie. - F On Fri, Mar 13, 2015 at 11:03 AM, Matthias Dieter Wallnöfer < mat...@ya...> wrote: > At the moment I was just testing it with the Jolie website: > http://localhost:8000/planet. > > Matthias > > Fabrizio Montesi <fam...@gm...> schrieb am 10:48 Freitag, 13.März > 2015: > > Hi Matthias, > > Maybe it's a good idea to develop the test for it first, as this is a very > sensitive area (I remember being very happy the first time it worked :-P). > Any ideas on how we could automate, for example, sending and receiving a > file in chunks? > > Or, how are you testing chunking right now? > > Ciao, > F > > > On Thu, Mar 12, 2015 at 10:02 PM, Matthias Dieter Wallnöfer < > mat...@ya...> wrote: > > Next attempt to fix the chunk parsing code, does still not work (I am > >following http://tools.ietf.org/html/rfc2616#section-3.6.1). > > > >Matthias Dieter Wallnöfer schrieb: > >> Just apply my patch, then start a local Leonardo on Jolie's website and > >> click on Blogs and/or Tutorials. You will immediately notice that it > >> gets stuck. > >> > >> Considering Leonardo's stacktrace you will see that the chunk parsing > >> code is the cause... > >> > >> Cheers, > >> Matthias > >> > >> > >> Fabrizio Montesi <fam...@gm...> schrieb am 12:07 Mittwoch, > >> 11.März 2015: > >> > >> > >> I wrote that code in ancient times. Let me know how I can help. :-) > >> > >> On Tue, Mar 10, 2015 at 10:23 PM, Matthias Dieter Wallnöfer > >> <mwa...@ya... <mailto:mwa...@ya...>> wrote: > >> > >> Exactly, it works like this. Therefore readAll in HttpParser works > >> directly with the byte array deriving from the InputStream. > >> > >> But the header needs to be parsed in UTF-8 to get Unicode-enabled > >> URIs. It would be nice if someone could help me with porting/fixing > >> the chunk parsing code. .. > >> > >> Von Samsung Mobile gesendet > >> > >> > >> -------- Ursprüngliche Nachricht -------- > >> Von: Fabrizio Montesi __ > >> Datum:10.03.2015 21:05 (GMT+01:00) > >> An: Matthias Dieter Wallnöfer __ > >> Cc: jol...@li... > >> <mailto:jol...@li...> > >> Betreff: Re: [Jolie-devel] HTTP URI UTF-8 parsing > >> > >> 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 > > > >> > >> > >> > >> > >> > >> > >> > >> > ------------------------------------------------------------------------------ > >> 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... > >> https://lists.sourceforge.net/lists/listinfo/jolie-devel > >> > > > > > |