libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] I encountered a strange problem in http packet when


From: Evgeny Grin
Subject: Re: [libmicrohttpd] I encountered a strange problem in http packet when using libmicrohttpd
Date: Thu, 4 Aug 2016 12:44:39 +0300
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

Hi!

Could you show code which generate and send responses?

As general note: header is not a good place to put long request
information. I suggest you to use POST for such task. Moreover, proxies,
firewall and other network filters may not correctly process curly
bracket followed by quote mark and/or too long header lines.

Try same test in local WiFi network.

--
Best Wishes,
Evgeny Grin

On 04.08.2016 7:43, 巴黎乞丐 wrote:
> *_/Here is the normal packet:/_*
> 
> GET
> /api/v1/tr/articles?to_offset=1470285273&channel_id=0&off_line=off&tmsec=1470285332&sign=efce00c406b588191fdd1e08375e71f9
> HTTP/1.1
> 
> common-info:
> {"android_id":"1cc1c8a4fab25d40","app_name":"Gundem","auth_type":0,"device_id":"9ad8c5c8-0efd-4f1d-83ac-404a49fa6177","device_platform":"android","device_type":"General
> Mobile
> 4G","distribution_channel":"googleplay_gundem","imei":"351754074054286","language":"tr","mac":"02:00:00:00:00:00","os_version":"6.0.1","user_id":1155043570077878460,"version_code":55}
> 
> Host: cepbaslik.com:8007
> 
> Connection: Keep-Alive
> 
> Accept-Encoding: gzip
> 
> User-Agent: okhttp/2.5.0
> 
> 
> HTTP/1.1 200 OK
> 
> Server: openresty/1.9.3.1
> 
> Date: Thu, 04 Aug 2016 04:35:33 GMT
> 
> Content-Length: 6275
> 
> Connection: keep-alive
> 
> 
> { "now": 1470285333, "error_code": 0, "error_msg": "success", "data": [
> { "url":
> "http:\/\/www.log.com.tr\/facebook-ilk-canli-mac-yayinina-hazirlaniyor\/",
> "id": 1407515, "type": 0, "category_id": 7, "source": "Log", "find_id":
> "6314545074168405886", "title": "Facebook ilk canl.. ma.. yay..n..na
> haz..rlan..yor", "data_type": "news", "display_time": 1470285333,
> "read_count": 0, "show_count": 55, "like_count": 0, "dislike_count": 0,
> "comment_count": 0, "debug": "ALG:1407515 ctr:0.058065
> time_rank:0.000000 human_rank:0.000000 topic_rank:0.000000
> webvideo_rank:0.000000 LDA:0.000000 tag:0.000000alg_source:0
> score:0.014429 ", "priority": 0, "style_type": "single_image",
> "thumbnails": [
> "http:\/\/now-static.annabox.info\/images\/tr-tr\/06acae5ab5a997070f5fe0bfd669d4f1.JPEG?webp=1"
> ], "actions": [ ], "tag": [ ] }, { "url":
> "http:\/\/www.hwa.com.tr\/yeni-nexus-cihazlar-hakkinda-baska-bir-sizinti\/",
> "id": 1406791, "type": 0, "category_id": 7, "source": "Hwa", "find_id":
> "6314545074168405886", "title": "Yeni Nexus cihazlar hakk..nda ba..ka
> bir s..z..nt..!", "data_type": "news", "display_time": 1470285326,
> "read_count": 0, "show_count": 55, "like_count": 0, "dislike_count": 0,
> "comment_count": 0, "debug": "ALG:1406791 ctr:0.058065
> time_rank:0.000000 human_rank:0.000000 topic_rank:0.000000
> webvideo_rank:0.000000 LDA:0.000000 tag:0.000000alg_source:0
> score:0.014429 ", "priority": 0, "style_type": "single_image",
> "thumbnails": [
> "http:\/\/tr-static.gundemdata.com\/common\/gundem_recommendation.jpg"
> ], "actions": [ ], "tag": [ ] }, { "url":
> "https:\/\/www.technopat.net\/2016\/08\/03\/instagram-icin-stories-ozelligi-geldi\/",
> "id": 1407774, "type": 0, "category_id": 7, "source": "Technopat",
> "find_id": "6314545074168405886", "title": "Instagram ....in Stories
> ..zelli..i Geldi", "data_type": "news", "display_time": 1470285319,
> "read_count": 1, "show_count": 73, "like_count": 0, "dislike_count": 0,
> "comment_count": 0, "debug": "ALG:1407774 ctr:0.057803
> time_rank:0.000000 human_rank:0.000000 topic_rank:0.000000
> webvideo_rank:0.000000 LDA:0.000000 tag:0.000000alg_source:0
> score:0.014364 ", "priority": 0, "style_type": "single_image",
> "thumbnails": [
> "http:\/\/now-static.annabox.info\/images\/tr-tr\/6bd0479910b232435c488b20ad747d2c.JPEG?webp=1"
> ], "actions": [ ], "tag": [ ] }, { "url":
> "http:\/\/www.sozcu.com.tr\/2016\/gundem\/zirhli-aracin-gecisi-sirasinda-patlama-1339121\/",
> "id": 1407490, "type": 0, "category_id": 5, "source": "S..zc..",
> "find_id": "6314545074168405886", "title": "Z..rhl.. arac..n ge..i..i
> s..ras..nda patlama!", "data_type": "news", "display_time": 1470285312,
> "read_count": 3536, "show_count": 30583, "like_count": 4,
> "dislike_count": 9, "comment_count": 3, "debug": "ALG:1407490
> ctr:0.115536 time_rank:0.000000 human_rank:0.000000 topic_rank:0.000000
> webvideo_rank:0.000000 LDA:0.000000 tag:0.000000alg_source:0
> score:0.012428 ", "priority": 12, "style_type": "single_image",
> "thumbnails": [
> "http:\/\/now-static.annabox.info\/images\/tr-tr\/e30b4cbe065a54ad772bc979766cf137.JPEG?webp=1"
> ], "actions": [ ], "tag": [ ] }, { "url":
> "http:\/\/www.yenisafak.com.tr\/ortadogu\/rusya-yardim-tirlarini-vurdu-6-olu-2504990",
> "id": 1407205, "type": 0, "category_id": 6, "source": "Yeni ..afak",
> "find_id": "6314545074168405886", "title": "Rusya yard..m TIR'lar..n..
> vurdu: 6 ..l..", "data_type": "news", "display_time": 1470285305,
> "read_count": 1003, "show_count": 10519, "like_count": 1,
> "dislike_count": 6, "comment_count": 1, "debug": "ALG:1407205
> ctr:0.095301 time_rank:0.000000 human_rank:0.000000 topic_rank:0.000000
> webvideo_rank:0.000000 LDA:0.000000 tag:0.000000alg_source:0
> score:0.011329 ", "priority": 0, "style_type": "single_image",
> "thumbnails": [
> "http:\/\/tr-static.gundemdata.com\/common\/gundem_recommendation.jpg"
> ], "actions": [ ], "tag": [ ] }, { "url":
> "http:\/\/www.milliyet.com.tr\/Milliyet-Tv\/video-izle\/Yolcu-ucagi-acil-inis-yapti-WjMeh6l5oL1Z.html",
> "id": 1407125, "type": 0, "category_id": 1900, "source": "Milliyet",
> "find_id": "6314545074168405886", "title": "Yolcu u..a.... acil ini..
> yapt..", "data_type": "news", "display_time": 1470285298, "read_count":
> 367, "show_count": 9572, "like_count": 0, "dislike_count": 0,
> "comment_count": 0, "debug": "ALG:1407125 ctr:0.038875
> time_rank:0.000000 human_rank:0.000000 topic_rank:0.000000
> webvideo_rank:1.000000 alg_source:90000 score:0.038875 ", "priority":
> 98, "style_type": "single_image", "thumbnails": [
> "http:\/\/tr-static.gundemdata.com\/video\/2016-08-03\/8b8ef93ceb922ffb_640_360.jpeg"
> ], "actions": [ ], "tag": [ { "name": "Video", "color": "#990000" } ] },
> { "url":
> "http:\/\/www.yenicaggazetesi.com.tr\/akin-ozturk-cezaevinde-saldiriya-mi-ugradi-143332h.htm",
> "id": 1407489, "type": 0, "category_id": 1, "source": "Yeni Cag",
> "find_id": "6314545074168405886", "title": "Ak..n ..zt..rk cezaevinde
> sald..r..ya m.. u..rad..?", "data_type": "news", "display_time":
> 1470285291, "read_count": 3199, "show_count": 31544, "like_count": 0,
> "dislike_count": 3, "comment_count": 6, "debug": "ALG:1407489
> ctr:0.101378 time_rank:0.000000 human_rank:0.000000 topic_rank:0.000000
> webvideo_rank:0.000000 LDA:0.000000 tag:0.000000alg_source:0
> score:0.011310 ", "priority": 13, "style_type": "single_image",
> "thumbnails": [
> "http:\/\/trimg.gundemdata.com\/news\/2016-08-03\/thumb\/4e86b37ce920f991.jpeg"
> ], "actions": [ ], "tag": [ ] }, { "url":
> "http:\/\/www.onedio.com\/haber\/ahmet-davutoglu-na-cenazede-olum-tehdidi-724368",
> "id": 1407728, "type": 0, "category_id": 1, "source": "Onedio",
> "find_id": "6314545074168405886", "title": "Ahmet Davuto..lu'na Cenazede
> ..l..m Tehdidi", "data_type": "news", "display_time": 1470285284,
> "read_count": 5411, "show_count": 53399, "like_count": 3,
> "dislike_count": 21, "comment_count": 11, "debug": "ALG:1407728
> ctr:0.101310 time_rank:0.000000 human_rank:0.000000 topic_rank:0.000000
> webvideo_rank:0.000000 LDA:0.000000 tag:0.000000alg_source:0
> score:0.011302 ", "priority": 0, "style_type": "three_image",
> "thumbnails": [
> "http:\/\/tr-static.gundemdata.com\/news\/2016-08-03\/b38f4738ff436eb4_300_169.jpeg",
> "http:\/\/tr-static.gundemdata.com\/news\/2016-08-03\/7f48910851915c20_300_279.jpeg",
> "http:\/\/tr-static.gundemdata.com\/news\/2016-08-03\/78ea0d06c7f7c465_300_400.jpeg"
> ], "actions": [ ], "tag": [ ] } ] }
> 
> 
> *_/And here is the abnormal packet:/_*
> 
> 
> GET
> /api/v1/tr/articles/1407515?tmsec=1470285480&sign=f51c8ac8103a8bc01266721d49953871
> HTTP/1.1
> 
> common-info:
> {"android_id":"1cc1c8a4fab25d40","app_name":"Gundem","auth_type":0,"device_id":"9ad8c5c8-0efd-4f1d-83ac-404a49fa6177","device_platform":"android","device_type":"General
> Mobile
> 4G","distribution_channel":"googleplay_gundem","imei":"351754074054286","language":"tr","mac":"02:00:00:00:00:00","os_version":"6.0.1","user_id":1155043570077878460,"version_code":55}
> 
> Host: cepbaslik.com:8007
> 
> Connection: Keep-Alive
> 
> Accept-Encoding: gzip
> 
> User-Agent: okhttp/2.5.0
> 
> 
> HTTP/1.1 200 OK
> 
> Server: openresty/1.9.3.1
> 
> Date: Thu, 04 Aug 2016 04:38:02 GMT
> 
> Content-Length: 1361
> 
> Connection: keep-alive
> 
> 
> ........ 1470285482, "error_code": 0, "error_msg": "success", "data": {
> "content": "<img
> src=\"http:\/\/now-static.annabox.info\/images\/tr-tr\/0e020679d2a049c3731a57b135fb5740.JPEG?webp=1\"><p>Facebook
> Live ..zerinden konser, s..yle..i vb. yay..nlarla canl.. yay..n
> konusunda iyice ustala..an Facebook ilk canl.. ma.. yay..n..na
> haz..rlan..yor. Sosyal medya devinin bu anlamdaki ilk s..nav.., bu
> ak..am oynanacak <b>Manchester United ... Everton<\/b> haz..rl..k ma....
> olacak.<\/p><p>..ki Premier Lig ekibi aras..nda oynanacak haz..rl..k
> ma...., bu ak..am T..rkiye saati ile 22:00...da Facebook taraf..ndan
> naklen yay..nlanacak. Eski Everton efsanesi, ..imdilerde Mancherster
> United kaptan.. olan Wayne Rooney...i onurland..rmak i..in d..zenlenen
> ma..ta Zlatan ..brahimovi.. ba..ta olmak ..zere K..rm..z.. ..eytanlar..n
> yeni y..ld..zlar..n.. da yak..ndan g..rme ..ans.. elde edece..iz. Ma..
> yay..n..n.. <b>Mancher United Facebook<\/b> sayfas.. ve <b>Wayne Rooney
> Facebook<\/b> sayfas.. ..zerinden takip edebilirsiniz.<\/p>",
> "data_type": "news", "url":
> "http:\/\/www.log.com.tr\/facebook-ilk-canli-mac-yayinina-hazirlaniyor\/",
> "id": 1407515, "type": 0, "now": 1470285482, "source": "Log", "title":
> "Facebook ilk canl.. ma.. yay..n..na haz..rlan..yor", "publish_time":
> 1470234876, "like_count": 0, "dislike_count": 0, "comment_count": 0,
> "source_info": { } } }
> 
> 
> /The Problem is that in the beginning of the abnormal http packet
> body,it starts with ........ which should { "now": as the normal packet
> does./
> 
> /But in my log,everything is alright.It seems that libmicrohttpd broke
> the message.Is it possible?/
> 

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]