Zennoposter post/multipart EOL(end of line) character missing

ss130

Client
Регистрация
28.11.2015
Сообщения
15
Благодарностей
0
Баллы
1
Hi all, i have some trouble with zenno:

im send request like this:
Код:
....
------WebKitFormBoundaryzY95f7AKvlgfjA4W
Content-type: text/plain
Content-Disposition: form-data; name="body"

regregerg
wefewf
wefewf
23f2f
wefdssdfdsf
....

But server gets variable Body with string
"regregergwefewfwefewf23f2fwefdssdfdsf"
// No End of line characters
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 182
Баллы
113

ss130

Client
Регистрация
28.11.2015
Сообщения
15
Благодарностей
0
Баллы
1
i`m already try this, it`s not help

C# code =
Код:
result +=
            "<product>" + "\r\n"
                + "<link>"+link+"</link>" + "\r\n"
                + "<title>"+title+"</title>" + "\r\n"
                + "<price>"+price+"</price>" + "\r\n"
                + "<json>"+json+"</json>" + "\r\n"
            +"</product>" + "\r";
post-requset from zenno (multipart)
Код:
--Asrf456BGe4h
Content-Disposition: form-data; name="FromLink"

MyFromLink1
--Asrf456BGe4h
Content-Type: text/plain; charset=UTF8
Content-Disposition: form-data; name="data"


123\r\n
234\r\n
345\r\n
{-Variable.JSCatalogProducts-}
--Asrf456BGe4h
--Asrf456BGe4h--
BUT:

Код:
123\r\n
234\r\n
inserted as plaint text:
Код:
123\r\n234\r\n345\r\n
but most problem that C#/xml also not handle "\r\n"
in database i have all data in one line, i never seen that before.
When i`m used \r\n always work correct.


i see the result string (in HEX view) there are no any kind of symbols between </link> and <title>
posibly zennoposter just cut them
 
Последнее редактирование:

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 182
Баллы
113

ss130

Client
Регистрация
28.11.2015
Сообщения
15
Благодарностей
0
Баллы
1
If you use c# then this will help
Environment.NewLine
No it doesn`t help and never help, you don`t understand situation:

1. that variable formed correctly.

var = "1qweqwe".Environment.NewLine."2qweqwe".Environment.NewLine."3qweqwe"

BUT @NEW LINE@ characters DELETED AFTER POST-REQUEST.
SERVER do not receive any NewLine character.
It`s not problem of server, its PROBLEM OF ZENNOPOSTER. directly - problem of zenno`s Post-Request module.

whatever characters I did not put, the use of the function or no function is absolutely pointless
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 707
Баллы
113
What do you see in Fiddler when you send this request?
Does it have linebreaks?
 
  • Спасибо
Реакции: ss130

ss130

Client
Регистрация
28.11.2015
Сообщения
15
Благодарностей
0
Баллы
1
What do you see in Fiddler when you send this request?
Does it have linebreaks?
ООО, привет!!!

Да, до отправки поста перемнная абсолютно точно содержит переносы строк, даже в редакторе переменных это видно.

Я кстати даже пробовал post через C#, там в принципе такая же ситуация - брейки начисто режутся и это очевидно.
Как в этом примере:
http://zennolab.com/discussion/threads/post-zapros-cherez-c-i-peredat-kartinku.21923/#post-146754


Через wireshark получаю такие пакеты:
Код:
POST /my/path?with=args HTTP/1.1
Content-Type: multipart/form-data; boundary=--Asrf456BGe4h
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.5
Host: my.host.ru
Content-Length: 18044

----Asrf456BGe4h
Content-Disposition: form-data; name="group"

test1
----Asrf456BGe4h
Content-Disposition: form-data; name="FromLink"

MyFromLink1
----Asrf456BGe4h
Content-Disposition: form-data; name="data"

<product_list><product><link>https://market.yandex.ru/product/1570312132?hid=10683227&show-uid=49090127785890018141000</link><title>  Spin Master  </title><price>590</price> ...........ALL_DATA_IN_ONE_ROW............. </product></product_list>
----Asrf456BGe4h--
Один из элементов данных = это строчка с переносами, она так же становится строчкой без переносов.
В HEX редакторе на сервере видно, что вместо \r\n там сияет его полное отсутствие, т.е. соседние символы есть, а сам брейк исчезает.

При этом запрос post/urlencoded + Uri.EscapeDataString(result);
Ничего не обрезает и работает как часы.
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)