On 24 out, 05:01, "Michael Klishin" <[EMAIL PROTECTED]> wrote: > 2008/10/24 maguiar <[EMAIL PROTECTED]>: > > > (Sorry if i don't make myself very clear, i don't speak english) > > You did, thank you. It's an issue with slightly (think 1 missing > character) incorrect > multipart body payload that some browsers send. > > It'd be great if someone can post an image/multipart body of it that > caused the issue. I'd create a spec example from it > and fix this issue later today. > -- > MK
I will share some facts from my debugging session. My Setup: - application code running on windows xp, merb 0.9.5 - same application code, running on ubuntu 7.10, merb 0.9.10 Posting files from windows, using firefox 3 and IE 6: app in merb 0.9.5 works fine app in merb 0.9.10 show the bug Debugging simultaneously the method #parse_multipart on win/merb 0.9.5 and ubuntu/meb 0.9.10 with the same input. - the parameters of the method call are equals. - the content of request is apparently equal. Same length, and i've checked random bytes of the request from both app during the debugging, and they always matched. - everything looks identical in both app until the moment where the regular expression 'rx' fails. Then i got to the point where the regex fail, right after the line 'if i=buf.index(rx)'. In both apps the variable buf has the same size, starting and ending bytes are the same. The only diferrence that i could find is where the regex match. the WTF moment for me: (remember, rx should match a '\r\n' but it don't, so the variable 'i' is off by 2) i # lets say 1000, just for example. the others values are 'real' buf[i] # 45 buf[i-1] # 10 buf[i-2] # 13 buf[i-3] # 217 buf.index(rx) # 1000 buf.index(rx,i) # 1000 buf.index(rx,i-2) # 998 (!) buf.index(rx,i-3) # 1000 (!!!) buf[i-3]=180 # buf.index(rx) # 998 buf.index(rx,i-2) # 998 buf.index(rx,i-3) # 998 buf[i-3]=200 # buf.index(rx) # 1000 buf.index(rx,i-2) # 998 buf.index(rx,i-3) # 1000 Again, i hope this help. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "merb" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/merb?hl=en -~----------~----~----~----~------~----~------~--~---
