Page 2 of 2
Re: POST command and timeout
Posted: Tue May 01, 2012 9:03 pm
by mwieder
It works for me without this line:
Accept: */*
in the full stack the password is protected, anyway this is going to be an app for the iphone, so once the user give username and password the data is stored in a secure way inside he app itself
Yes, but... in the stack you posted here *your* username/password pair is in plain text in a field.
Re: POST command and timeout
Posted: Tue May 01, 2012 9:15 pm
by tzenobite
ok, maybe i have to change the password soon

Re: POST command and timeout
Posted: Tue May 01, 2012 10:22 pm
by tzenobite
bohhhhhhhhhh
i can't understand...
the stack still get truncated only a few files... actually, both the simple stack i've posted and the full stack get the same file (the one named "alieno 5") truncated at the same word
the header is the same:
Code: Select all
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
Timeout: 50000
Connection: keep-alive
Content-Type: application/xml
maybe the problem is the website and not the stack, but i have to try to get all working in the best way
any idea? there's a way to keep the stack "hearing" to the website until the file is fully downloaded?
i've found the "load" command for GET but i think it doesn't work for the POST
Re: POST command and timeout
Posted: Tue May 01, 2012 10:51 pm
by tzenobite
it' WEIRD
last news (and then i go to sleep, here the time is 11.47 pm

): i put the truncated text in a field, i mean "truncated" because i scroll the field and i see only a part of the text
but if i "answer" the content of the same field, in the "answer" box the text is full
so, it's possible that a field shows only some of it contents? isn't it a little bit strange ?
i'm going to sleep, i'm dead

Re: POST command and timeout
Posted: Tue May 01, 2012 11:58 pm
by sturgis
Hey, this may be some of the quirkyness of the field. If you "put the number of chars" of your data when its not in the field (IE in the variable that you use with answer) and then "put the number of chars.." of the field, my guess is they will be the same despite what the field is showing.
This would only apply if you have some really long single lines with no line break.
tzenobite wrote:it' WEIRD
last news (and then i go to sleep, here the time is 11.47 pm

): i put the truncated text in a field, i mean "truncated" because i scroll the field and i see only a part of the text
but if i "answer" the content of the same field, in the "answer" box the text is full
so, it's possible that a field shows only some of it contents? isn't it a little bit strange ?
your
i'm going to sleep, i'm dead

Re: POST command and timeout
Posted: Wed May 02, 2012 3:20 am
by sturgis
Yep, thats it. To see what i'm talking about, select alieno 4. the answer dialog pops up, then field prova is filled with the results that appear incorrect (though there are 13k+ chars in the field you can't see most of them)
in the message box (multi-line) execute the following
repeat with i = 1 to 13
put return after char (i * 1000) of field "prova"
end repeat
Voila' the way too long single line of text that won't display properly is broken into smaller chunks that the field can handle and all the text shows.
There is something about this in one of the dictionary entries but I can't seem to find the right one. The behavior of the field is different with the dontwrap set to true also, but still doesn't work right for this. There are differences in the max char display width, and the max line length of a field but without being able to find those notes in the dictionary again I can't tell you exactly how things work.
Re: POST command and timeout
Posted: Wed May 02, 2012 7:22 am
by bangkok
Here is your stack, with some modifications :
-the proper header in order to receive the data until the end (i've tested it on each book, it's working fine for me)
-a new field that handle UTF8 so you can display special italian characters : é, ô etc.
Re: POST command and timeout
Posted: Wed May 02, 2012 6:13 pm
by mwieder
bangkok - nicely done. it works for me as well, once I cleaned up the "=" again.
Re: POST command and timeout
Posted: Wed May 02, 2012 10:30 pm
by tzenobite
maybe i have found the trick, at least
i've tried another thing: a "repeat" loop where the script bring a word at time and put it and " " after a new, empty variable: it doesn't work, the text is truncated, again
then i tried again: a "replace " " with return" that have to put every word in a new line, but... some lines, even if i see spaces, still was longer than the field
the broken texts contains some strange codes: \u000d, \u000a and \u0009
i tried to clean up these codes simply to not see it, but it seems to work like "tags", once i removed it the text seems to work: the replace " " with return works
i think these codes (\u000d, \u000a and \u0009) works in a strange way and keep the text between it together like a single word
hope this helps
edit: the code is unicode

it seems like the authors posted to the website the texts with returns in it and the website's database (with java, i suppose) coded the returns with unicode codes for CR and LF, in fact, if i change " \u000d\u000a" in the whole text i get the page "formatted" or so

Re: POST command and timeout
Posted: Thu May 03, 2012 7:21 am
by bangkok
tzenobite wrote:maybe i have found the trick, at least
i've tried another thing: a "repeat" loop where the script bring a word at time and put it and " " after a new, empty variable: it doesn't work, the text is truncated, again)
I'm totally lost. Why do you continue to experience problems with truncated texts ?
With the stack I've sent yesterday, there are no truncated texts.
Have you tried it ?
Re: POST command and timeout
Posted: Thu May 03, 2012 10:41 pm
by tzenobite
i tried but these codes still appears... now don't
