Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8844131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:24:30+00:00 2026-06-14T11:24:30+00:00

I’m writing Web Service using perl 5.16.2, OAuth::Lite(1.31). Server is CentOS release 6.3 (Final),

  • 0

I’m writing Web Service using perl 5.16.2, OAuth::Lite(1.31).
Server is CentOS release 6.3 (Final), 2.6.32-279.14.1.el6.x86_64.

Problem is when I request a token for twitter oauth, OAuth::Lite get_request_token blocks server execution for 30 sec, and sometimes returns proper response and sometimes timeouts browser request.

Minimum code to reproduce the probrem is below,

use OAuth::Lite::Consumer;                                                            

my $consumer = OAuth::Lite::Consumer->new(                                      
  request_token_path => 'https://api.twitter.com/oauth/request_token',          
  consumer_key       => '[CONSUMER KEY]',                               
  consumer_secret    => '[CONSUMER SECRET]',            
  callback_url       => '[CALLBACK]',                    
);                                                                              

my $rtoken = $consumer->get_request_token();

will return after 30sec.

I read the code, and I figure out that method my_readline in Net::HTTP::Methods line 259-260 in Net::HTTP 6.05

die "read timeout" unless $self->can_read;
my $n = $self->sysread($_, 1024, length);

blocks request. And the header that my_readline trying to read is

HTTP/1.1 200 OK
Date: Fri, 16 Nov 2012 16:16:39 GMT
Status: 200 OK
X-MID: 266cca0268c8eb68e76eedda256c77829ea9b22e
X-Transaction: 784ff126dfead993
Tag: "382e5356bb65e976f6b117bacdfa05e4"
Cache-Control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0
X-Runtime: 0.02892
Pragma: no-cache
Expires: Tue, 31 Mar 1981 05:00:00 GMT
X-Frame-Options: SAMEORIGIN
Content-Type: text/html; charset=utf-8
Last-Modified: Fri, 16 Nov 2012 16:16:39 GMT
Set-Cookie: k=10.36.55.109.1353082599368934; path=/; expires=Fri, 23-Nov-12 16:16:39 GMT; domain=.twitter.com
Set-Cookie: guest_id=v1%3A135308259937793094; domain=.twitter.com; path=/; expires=Mon, 17-Nov-2014 04:16:39 GMT
Set-Cookie: _twitter_sess=BAh7CCIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo%250ASGFzaHsABjoKQHVzZWR7ADoHaWQiJTJlZGJiN2MyOTMyNmM0OGY0MjJmZmY0%250AMTU3YzllYTI0Og9jcmVhdGVkX2F0bCsI0vcBCjsB--21ab24a6dd6596b1dcc78651c0b6a4836b320621; domain=.twitter.com; path=/; HttpOnly
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 150
Server: tfe

This header exceeded 1024 characters. So I changed 1024 to 2048, It started to work fine…
I want to figure out the reason of this problem.

Any helps appreciated.
Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T11:24:32+00:00Added an answer on June 14, 2026 at 11:24 am

    Years ago, I had a bad experience with LWP::Protocol::https (also used by OAuth::Lite), specially on CentOS. To get the long story short: too much frustration trying to compile Net::SSLeay on that platform lead me to replace LWP::UserAgent by WWW::Curl. Which compiles just fine. And worked great for that simple application.
    However, OAuth::Lite is tightly coupled to LWP, and it is pointless to reimplement everything.
    And there is another way of using libcurl with LWP-based code:
    http://blogs.perl.org/users/stas/2012/11/libcurl-as-lwp-backend-or-all-your-protocol-are-belong-to-us.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am reading a book about Javascript and jQuery and using one of the
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
Seemingly simple, but I cannot find anything relevant on the web. What is the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.