Hello Esteban, On 29 Apr 2011, at 00:26, Esteban Lorenzano wrote:
Thanks for reporting these issues, I'll have a look at them, but during the day I am out of the office and have meetings, so it won't be until the evening that I have some time, maybe only tomorrow. I remember having thought about the first issue, I just don't remember why I did it that way, I'll have to check a bit. The second issue them, can you send a print string of the headers in that response ? Maybe there just is no body ? Is there a way for me to try that request ? Sven > Hi, > I found some problems on Zinc implementation. > > Take this example: > > HTTPSocket > httpGetDocument: > 'http://127.0.0.1:333/analytics/feeds/accounts/default' > args: (Dictionary new > at: 'prettyprint' put: #('true'); > yourself) > accept: '*/*' > request: ('Authorization: GoogleLogin Auth={1}{2}' format: {self > authenticationKey. String crlf} > > this, if I have the correct authentication key, gives me the correct answer > (an atom-xml response). > > Now, if I try: > > ZnHTTPSocketFacade > httpGetDocument: > 'http://127.0.0.1:333/analytics/feeds/accounts/default' > args: (Dictionary new > at: 'prettyprint' put: #('true'); > yourself) > accept: '*/*' > request: ('Authorization: GoogleLogin Auth={1}{2}' format: {self > authenticationKey. String crlf} > > (this should work, as the facade is for compatibility, I think) > > I have two errors, one of them easily solvable, and the other... well... I > couldn't solve it in the 15' I spent on it :) > > 1) arguments are not in the correct way. While HTTPSocket functions expect > something like this: > > Dictionary new > at: 'prettyprint' put: #('true'); "<-- Parameter is an array" > yourself. > > ZnHTTPSocketFacade expects something like this: > > Dictionary new > at: 'prettyprint' put: 'true'; "<-- Parameter is a string" > yourself. > > 2) This is the hard one. If you do the get request with parameter fixed, you > should get the atom feed. > But you don't. > You get a ZnResponse who is OK (status 200), but entity is empty. I followed > the error until this method: > > canReadContent > ^ self hasContentLength or: [ self isChunked or: [ self > allowsReadingUpToEnd ] ] > > who return false, because none of the questions is true. Then, no entity is > filled, and I have no answer :( > > Hope this help :) > > Cheers, > Esteban > > > > > > > > >
