xiehuc / pidgin-lwqq

a pidgin plugin based on lwqq, a excellent safe useful library for webqq protocol
GNU General Public License v3.0
660 stars 185 forks source link

发不出去图片 #285

Closed 1a57danc3 closed 11 years ago

1a57danc3 commented 11 years ago

对方接受的是一串乱码

Lavande commented 11 years ago

有类似问题,25 May 2013更新的master分支,在讨论组和群里发图片,对方显示空白

lainme commented 11 years ago

27日dev分支同样,webqq只显示破损的图片。pidgin-lwqq端显示Upload content retry over limit,终端显示

r={"to":2990485076,"content":"[[\"offpic\",\"(null)\",\"avatar.jpg\",7291],[\"font\",{\"name\":\"宋体\",\"size\":\"11\",\"style\":[0,0,0],\"color\":\"000000\"}]]","msg_id":3670000,"clientid":"82986957","psessionid":"8368046764001d636f6e6e7365727665725f77656271714031302e3133332e34312e38340000708e0000135c016203590ad56d0000000a4039516a38326f63386a6d000000283a460c23c71e4ddec3cf7a3ac9d0ceca6f5e0d0bff89569cd4b7cab3928cabbd8736a7b90f131c13"}
{"retcode":0,"result":"ok"}
xiehuc commented 11 years ago

原来是忘记写discumsg的发送图片了。

dev已修正。

另外群图片发送失败是网络原因。把VERBOSE开到4,发送log看看。

2013/5/27 lainme notifications@github.com

27日dev分支同样,webqq只显示破损的图片。pidgin-lwqq端显示Upload content retry over limit,终端显示

r={"to":2990485076,"content":"[[\"offpic\",\"(null)\",\"avatar.jpg\",7291],[\"font\",{\"name\":\"宋体\",\"size\":\"11\",\"style\":[0,0,0],\"color\":\"000000\"}]]","msg_id":3670000,"clientid":"82986957","psessionid":"8368046764001d636f6e6e7365727665725f77656271714031302e3133332e34312e38340000708e0000135c016203590ad56d0000000a4039516a38326f63386a6d000000283a460c23c71e4ddec3cf7a3ac9d0ceca6f5e0d0bff89569cd4b7cab3928cabbd8736a7b90f131c13"} {"retcode":0,"result":"ok"}

— Reply to this email directly or view it on GitHubhttps://github.com/xiehuc/pidgin-lwqq/issues/285#issuecomment-18490012 .

Lavande commented 11 years ago

pidginqq dev试了一下,貌似不能收图片了,变成了一个【PIC】,发图片也提示失败

xiehuc commented 11 years ago

你用cmake .. -DVERBOSE=4编译安装。

在控制台下面运行pidgin。把发送图片相关的log贴出来。

我的网络比较好,所以发送接受都是OK的。

2013/5/29 Lavande notifications@github.com

[image: pidginqq]https://f.cloud.github.com/assets/2290696/574247/c52be8c4-c7c4-11e2-9670-f8b410c4c23f.png dev试了一下,貌似不能收图片了,变成了一个【PIC】,发图片也提示失败

— Reply to this email directly or view it on GitHubhttps://github.com/xiehuc/pidgin-lwqq/issues/285#issuecomment-18570537 .

Lavande commented 11 years ago

下面是两次发送图片,第一次在群1,图片大约500k,没有收到失败提示;第二次在群2,图片越1.5M,收到失败提示。

< HTTP/1.1 100 Continue

< HTTP/1.1 200 OK < Date: Thu, 30 May 2013 10:23:33 GMT < Server: Apache < Connection: close < Transfer-Encoding: chunked < Content-Type: text/html <

http://s.web2.qq.com/api/get_group_info_ext2?gcode=89577130&vfwebqq=69c6858c13a7775608d97f3702227428e482ebae99XXXXXXXXXX180806cdd0d225d26c936b171aab&t=1369909501 [group detail back]

< HTTP/1.1 100 Continue

< HTTP/1.1 200 OK < Date: Thu, 30 May 2013 10:25:12 GMT < Server: Apache < Connection: close < Transfer-Encoding: chunked < Content-Type: text/html <

xiehuc commented 11 years ago

第一次发送成功了。发送成功不提示。发送失败才提示。

我上webqq发送一个大图试一试。

2013/5/30 Lavande notifications@github.com

下面是两次发送图片,第一次在群1,图片大约500k,没有收到失败提示;第二次在群2,图片越1.5M,收到失败提示。

  • About to connect() to up.web2.qq.com port 80 (#1https://github.com/xiehuc/pidgin-lwqq/issues/1 )
  • Trying 112.90.142.201... * Connected to up.web2.qq.com(112.90.142.201) port 80 (

    1 https://github.com/xiehuc/pidgin-lwqq/issues/1) > POST

    /cgi-bin/cface_upload?time=1369909411 HTTP/1.1 Host: up.web2.qq.comUser-Agent: Mozilla/5.0 (X11; Linux x8664; rv:10.0) Gecko/20100101 Firefox/10.0 Accept: /_,text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap,;q=0.1 Accept-Language: zh-cn,zh;q=0.9,en;q=0.8 Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0 Connection: keep-alive Origin: http://web2.qq.com Referer: http://web2.qq.com/Cookie: ptvfsession=e55ddXXXXXXcb43967da291f2dc10f1975c16f11a6fb29f390bcXXXXXXb99dbf94a47223577387f171fff257273084d0; ptcz=6802fdXXXXXX84496fa0342b47594408e489cec9a044ef11b2fdXXXXXX903527; skey=@VaBXXXWHt; ptwebqq=1cf46eXXXXXXdc4ce8eb700fc890659e40032a28beef49836d9aXXXXXX652efe; ptuserinfo=e5878fe4baXXXXXXXX; uin=o01059XXXXX; ptisp=os; pt2gguin=o01059XXXXX; RK=r7hT9wJKzJ; Content-Length: 496886 Expect: 100-continue Content-Type: multipart/form-data; boundary=----------------------------bbfb2afeb03c

< HTTP/1.1 100 Continue

< HTTP/1.1 200 OK < Date: Thu, 30 May 2013 10:23:33 GMT < Server: Apache < Connection: close < Transfer-Encoding: chunked < Content-Type: text/html <

  • Closing connection #1https://github.com/xiehuc/pidgin-lwqq/issues/1r={"did":"7587164","key":"EvKGT6gvWCRX7fBV","sig":"c2f419b6f91ccff298aeee475e87707b2b421bd948ef3f68b78fac1c38f3eb21a7cf02f8fd22b2c012ae99cf0115b899230edb117ce87753","content":"[\"\",[\"cface\",\"group\",\"E13F0DF656904B7AFFDD4110075FE2B9.jPg\"],\"\",[\"font\",{\"name\":\"宋体\",\"size\":\"11\",\"style\":[0,0,0],\"color\":\"000000\"}]]","msg_id":2390000,"clientid":"84345554","psessionid":"83680467XXXXXXXX6f6e6e7365727665725f77656271714031302e3132382e36362e3131320000133a00001bbe0162065039fd6d0000000a405661427844555748746d0000002869c6858c13a7775608d97f3702227428e482ebae99XXXXXXXXXX180806cdd0d225d26c936b171aab"} {"retcode":0,"result":"ok"}

http://s.web2.qq.com/api/get_group_info_ext2?gcode=89577130&vfwebqq=69c6858c13a7775608d97f3702227428e482ebae99XXXXXXXXXX180806cdd0d225d26c936b171aab&t=1369909501 [group detail back]

  • About to connect() to up.web2.qq.com port 80 (#1https://github.com/xiehuc/pidgin-lwqq/issues/1 )
  • Trying 112.90.142.201... * Connected to up.web2.qq.com(112.90.142.201) port 80 (

    1 https://github.com/xiehuc/pidgin-lwqq/issues/1) > POST

    /cgi-bin/cface_upload?time=1369909512 HTTP/1.1 Host: up.web2.qq.comUser-Agent: Mozilla/5.0 (X11; Linux x8664; rv:10.0) Gecko/20100101 Firefox/10.0 Accept: /_,text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap,;q=0.1 Accept-Language: zh-cn,zh;q=0.9,en;q=0.8 Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0 Connection: keep-alive Origin: http://web2.qq.com Referer: http://web2.qq.com/Cookie: ptvfsession=e55ddXXXXXXcb43967da291f2dc10f1975c16f11a6fb29f390bcXXXXXXb99dbf94a47223577387f171fff257273084d0; ptcz=6802fdXXXXXX84496fa0342b47594408e489cec9a044ef11b2fdXXXXXX903527; skey=@VaBXXXWHt; ptwebqq=1cf46eXXXXXXdc4ce8eb700fc890659e40032a28beef49836d9aXXXXXX652efe; ptuserinfo=e5878fe4baXXXXXXXX; uin=o01059XXXXX; ptisp=os; pt2gguin=o01059XXXXX; RK=r7hT9wJKzJ; Content-Length: 1602842 Expect: 100-continue Content-Type: multipart/form-data; boundary=----------------------------df5ff6c835bb

< HTTP/1.1 100 Continue

< HTTP/1.1 200 OK < Date: Thu, 30 May 2013 10:25:12 GMT < Server: Apache < Connection: close < Transfer-Encoding: chunked < Content-Type: text/html <

  • Closing connection #1https://github.com/xiehuc/pidgin-lwqq/issues/1r={"group_uin":414541XXXX,"content":"[\"\",\"\",[\"font\",{\"name\":\"宋体\",\"size\":\"11\",\"style\":[0,0,0],\"color\":\"000000\"}]]","msg_id":2390000,"clientid":"84345554","psessionid":"83680467XXXXXXXX6f6e6e7365727665725f77656271714031302e3132382e36362e3131320000133a00001bbe0162065039fd6d0000000a405661427844555748746d0000002869c6858c13a7775608d97f3702227428e482ebae99XXXXXXXXXX180806cdd0d225d26c936b171aab"} {"retcode":0,"result":"ok"}

— Reply to this email directly or view it on GitHubhttps://github.com/xiehuc/pidgin-lwqq/issues/285#issuecomment-18673296 .

xiehuc commented 11 years ago

webqq不允许发送超过1M大小的图片。

extend 1Mgetcgiparams failed asdf

2013/5/30 谢虎成 xiehuc@gmail.com

第一次发送成功了。发送成功不提示。发送失败才提示。

我上webqq发送一个大图试一试。

2013/5/30 Lavande notifications@github.com

下面是两次发送图片,第一次在群1,图片大约500k,没有收到失败提示;第二次在群2,图片越1.5M,收到失败提示。

  • About to connect() to up.web2.qq.com port 80 (#1https://github.com/xiehuc/pidgin-lwqq/issues/1 )
  • Trying 112.90.142.201... * Connected to up.web2.qq.com(112.90.142.201) port 80 (

    1 https://github.com/xiehuc/pidgin-lwqq/issues/1) > POST

    /cgi-bin/cface_upload?time=1369909411 HTTP/1.1 Host: up.web2.qq.comUser-Agent: Mozilla/5.0 (X11; Linux x8664; rv:10.0) Gecko/20100101 Firefox/10.0 Accept: /_,text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap,;q=0.1 Accept-Language: zh-cn,zh;q=0.9,en;q=0.8 Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0 Connection: keep-alive Origin: http://web2.qq.com Referer: http://web2.qq.com/Cookie: ptvfsession=e55ddXXXXXXcb43967da291f2dc10f1975c16f11a6fb29f390bcXXXXXXb99dbf94a47223577387f171fff257273084d0; ptcz=6802fdXXXXXX84496fa0342b47594408e489cec9a044ef11b2fdXXXXXX903527; skey=@VaBXXXWHt; ptwebqq=1cf46eXXXXXXdc4ce8eb700fc890659e40032a28beef49836d9aXXXXXX652efe; ptuserinfo=e5878fe4baXXXXXXXX; uin=o01059XXXXX; ptisp=os; pt2gguin=o01059XXXXX; RK=r7hT9wJKzJ; Content-Length: 496886 Expect: 100-continue Content-Type: multipart/form-data; boundary=----------------------------bbfb2afeb03c

< HTTP/1.1 100 Continue

< HTTP/1.1 200 OK < Date: Thu, 30 May 2013 10:23:33 GMT < Server: Apache < Connection: close < Transfer-Encoding: chunked < Content-Type: text/html <

  • Closing connection #1https://github.com/xiehuc/pidgin-lwqq/issues/1r={"did":"7587164","key":"EvKGT6gvWCRX7fBV","sig":"c2f419b6f91ccff298aeee475e87707b2b421bd948ef3f68b78fac1c38f3eb21a7cf02f8fd22b2c012ae99cf0115b899230edb117ce87753","content":"[\"\",[\"cface\",\"group\",\"E13F0DF656904B7AFFDD4110075FE2B9.jPg\"],\"\",[\"font\",{\"name\":\"宋体\",\"size\":\"11\",\"style\":[0,0,0],\"color\":\"000000\"}]]","msg_id":2390000,"clientid":"84345554","psessionid":"83680467XXXXXXXX6f6e6e7365727665725f77656271714031302e3132382e36362e3131320000133a00001bbe0162065039fd6d0000000a405661427844555748746d0000002869c6858c13a7775608d97f3702227428e482ebae99XXXXXXXXXX180806cdd0d225d26c936b171aab"} {"retcode":0,"result":"ok"}

http://s.web2.qq.com/api/get_group_info_ext2?gcode=89577130&vfwebqq=69c6858c13a7775608d97f3702227428e482ebae99XXXXXXXXXX180806cdd0d225d26c936b171aab&t=1369909501 [group detail back]

  • About to connect() to up.web2.qq.com port 80 (#1https://github.com/xiehuc/pidgin-lwqq/issues/1 )
  • Trying 112.90.142.201... * Connected to up.web2.qq.com(112.90.142.201) port 80 (

    1 https://github.com/xiehuc/pidgin-lwqq/issues/1) > POST

    /cgi-bin/cface_upload?time=1369909512 HTTP/1.1 Host: up.web2.qq.comUser-Agent: Mozilla/5.0 (X11; Linux x8664; rv:10.0) Gecko/20100101 Firefox/10.0 Accept: /_,text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap,;q=0.1 Accept-Language: zh-cn,zh;q=0.9,en;q=0.8 Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0 Connection: keep-alive Origin: http://web2.qq.com Referer: http://web2.qq.com/Cookie: ptvfsession=e55ddXXXXXXcb43967da291f2dc10f1975c16f11a6fb29f390bcXXXXXXb99dbf94a47223577387f171fff257273084d0; ptcz=6802fdXXXXXX84496fa0342b47594408e489cec9a044ef11b2fdXXXXXX903527; skey=@VaBXXXWHt; ptwebqq=1cf46eXXXXXXdc4ce8eb700fc890659e40032a28beef49836d9aXXXXXX652efe; ptuserinfo=e5878fe4baXXXXXXXX; uin=o01059XXXXX; ptisp=os; pt2gguin=o01059XXXXX; RK=r7hT9wJKzJ; Content-Length: 1602842 Expect: 100-continue Content-Type: multipart/form-data; boundary=----------------------------df5ff6c835bb

< HTTP/1.1 100 Continue

< HTTP/1.1 200 OK < Date: Thu, 30 May 2013 10:25:12 GMT < Server: Apache < Connection: close < Transfer-Encoding: chunked < Content-Type: text/html <

  • Closing connection #1https://github.com/xiehuc/pidgin-lwqq/issues/1r={"group_uin":414541XXXX,"content":"[\"\",\"\",[\"font\",{\"name\":\"宋体\",\"size\":\"11\",\"style\":[0,0,0],\"color\":\"000000\"}]]","msg_id":2390000,"clientid":"84345554","psessionid":"83680467XXXXXXXX6f6e6e7365727665725f77656271714031302e3132382e36362e3131320000133a00001bbe0162065039fd6d0000000a405661427844555748746d0000002869c6858c13a7775608d97f3702227428e482ebae99XXXXXXXXXX180806cdd0d225d26c936b171aab"} {"retcode":0,"result":"ok"}

— Reply to this email directly or view it on GitHubhttps://github.com/xiehuc/pidgin-lwqq/issues/285#issuecomment-18673296 .

Lavande commented 11 years ago

原来还有这么个规定。。。。我再观察一下收图片

Lavande commented 11 years ago

对了,能不能加个功能,超过1M的自动压缩一下?

Lavande commented 11 years ago

群里接收图片被显示为【pic】一例 不懂代码,只是注意到一个细节,前面消息里 "time":1369921714,后面GET的时候url的参数里t=1369921715,不知道这个有没有关系……

[02:48:35 PM]{"retcode":0,"result":[{"poll_type":"group_message","value":{"msg_id":26815,"from_uin":XXXXXXXX,"to_uin":XXXXXXXX,"msg_id2":426926,"msg_type":43,"reply_ip":XXXXXXXX,"group_code":XXXXXXXX,"send_uin":XXXXXXXX,"seq":138114,"time":1369921714,"info_seq":24376607,"content":[["font",{"size":10,"color":"000000","style":[0,0,0],"name":"宋体"}],["cface",{"name":"{00306b23-6181-8398-88a6-129947aa52e7}.jpg","file_id":2323055578,"key":"uVtnjNnRafFS4XYc","server":"125.39.123.11:9063"}]," "]}}]}

< HTTP/1.1 302 OK < Connection: close < Date: Thu, 30 May 2013 13:48:36 GMT < Content-Length: 1 < Location:http://gchat.qpic.cn/gchatpic/2104376607/2104376607-2323055578-00306b236181839888a6129947aa52e7/0 < Content-Type: text/html <

< HTTP/1.1 404 Not Found < Server: ImgHttp3.0.0 < Content-Type: text/plain < Content-Length: 0 < X-ErrNo: -6101 <

xiehuc commented 11 years ago

我还没有想明白,需要一点时间。