Search for certain users is not working -



We are seeing an issue where searching for certain names using results in no data being returned. From the debug logs it seems that the connection to twitter is established but for some reason the connection was closed unexpectedly with status code = 0 (AFAIK 0 is not a valid http status code).

This issue can be reproduced consistently while searching for a certain set of names. E.g. “Julia”, “Parin”. Also the failure rate is more prominent when searching for single words. e.g.

Our production setup includes running play framework on a linux server to connect to twitter api via proxy.
We are not sure what is causing this issue, so we would like to know if someone else is experiencing the same issue.



Can you verify this issue without using your proxy? We don’t return HTTP 0 – but proxies do. How frequently are you issuing these requests?

Also, please note that API 1.1’s users/search method doesn’t support the per_page parameter. You want to use a count parameter instead.


I can’t reproduce the issue if I skip the proxy. On the other hand, I am still unable to reproduce the issue via the proxy using the curl command generated by the OAuth Tool provided under ‘My Applications’


Hi @episod
I changed the api to use count instead of per_page.

For the requests that don’t work via squid proxy, I used wireshark to capture https traffic and found that after the application data(encrypted get request) is sent to twitter server, the twitter server responds back with Encrypted Alert (21) followed by TCP [FIN,ACK] message to close the connection.
Any idea why the “Decryption failed” on twitter server for this particular request ?

Request that does not work over https via squid proxy

Request that does works over https via squid proxy

Note: If I switch to http twitter endpoints then, both the above requests are successful.

Thanks in advance


That would seem to suggest to me that your proxy is somehow invalidating the authenticity of your secure requests in some way. I’d verify your configuration extensively.