0

getting Request token error

I am getting cakePHP error when trying to get the request token

HttpSocket::decodeChunkedBody - Could not parse malformed chunk.

I am using the url https://api.login.yahoo.com/oauth/v2/get_request_token for getting the request token.

by
2 Replies
  • Hi prasad,

    Could you please provide us with additional information about the error. Specifically, the following would help us debug this issue:
    1. The full OAuth string that you are sending
    2. The headers of the request
    3. The response headers from the request (should include the full error)
    4. A code snippet of the OAuth process would also help

    Thanks.

    Jonathan LeBlanc
    Senior Software Engineer
    Yahoo! Developer Network
    Twitter: jcleblanc


    QUOTE (prasad t @ Sep 3 2009, 03:31 AM) <{POST_SNAPBACK}>
    I am getting cakePHP error when trying to get the request token

    HttpSocket::decodeChunkedBody - Could not parse malformed chunk.

    I am using the url https://api.login.yahoo.com/oauth/v2/get_request_token for getting the request token.
    0
  • QUOTE (Jon @ Sep 3 2009, 06:31 AM) <{POST_SNAPBACK}>
    Hi prasad,

    Could you please provide us with additional information about the error. Specifically, the following would help us debug this issue:
    1. The full OAuth string that you are sending
    2. The headers of the request
    3. The response headers from the request (should include the full error)
    4. A code snippet of the OAuth process would also help

    Thanks.

    Jonathan LeBlanc
    Senior Software Engineer
    Yahoo! Developer Network
    Twitter: jcleblanc


    I am using cakePHP Oauth Component for sending the request. it internally uses the HttpSocket class for sending the receiving the requests and response.

    the request array before writing to the socket is

    CODE
    Array ( [method] => GET [uri] => Array ( [scheme] => https [host] => api.login.yahoo.com [port] => 443 [user] => [pass] => [path] => /oauth/v2/get_request_token [query] => Array ( [oauth_callback] => [url="http://prasad.kamyoo.com/oauthConsumerExample/callback"]http://prasad.kamyoo.com/oauthConsumerExample/callback[/url] [oauth_consumer_key] => dj0yJmk9c2l1VG5ZSkJnOVJXJmsssQ9WVdrsfOWFEVmhRVGxoTXpZbWNHbzlOakEzTURVMU5EUTImcz1
    jb25zdW1lcnNlY3JldCZ4PTQw [oauth_nonce] => 2b14f892f18b37b93320a2633be99412 [oauth_signature] => 5wwN62627NCYqkXU3hidyVarPwk= [oauth_signature_method] => HMAC-SHA1 [oauth_timestamp] => 1251988951 [oauth_version] => 1.0 ) [fragment] => ) [auth] => Array ( [method] => basic [user] => [pass] => ) [version] => 1.1 [body] => [line] => GET /oauth/v2/get_request_token?oauth_callback=http%3A%2F%2Fprasad.kamyoo.com%2FoauthConsumerExample%2Fcallback&oauth_consumer_key=dj0yJmk9c2l1VG5ZSkJnOVJXJmQ9WVdrOWFEVmhRVGxoTXpZbWNHbzlOa
    kEzTURssVMU5EUTIffmcz1jb25zdW1lcnNlY3JldCZ4PTQw&oauth_nonce=2b14f892f18b37b93320a2633be99412&oauth_signature=5wwN62627NCYqkXU3hidyVarPwk%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1251988951&oauth_version=1.0 HTTP/1.1 [header] => Host: api.login.yahoo.com Connection: close User-Agent: CakePHP [raw] => GET /oauth/v2/get_request_token?oauth_callback=http%3A%2F%2Fprasad.kamyoo.com%2FoauthConsumerExample%2Fcallback&oauth_consumer_key=dj0yJmk9c2l1VG5ZSkJnOVJXJmQ9WVdrOWFEVmhRVGxoTXpZbWNHbzlOa
    kEzTURVMU5EUTImcz1jb25zdW1lcnNlY3JldCZ4PTQw&oauth_nonce=2b14f892f18b37b93320a2633be99412&oauth_signature=5wwN62627NCYqkXU3hidyVarPwk%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1251988951&oauth_version=1.0 HTTP/1.1 Host: api.login.yahoo.com Connection: close User-Agent: CakePHP [cookies] => Array ( ) )


    response array when I printed is

    CODE
    Array ( [raw] => Array ( [status-line] => HTTP/1.1 200 OK [header] => Content-Type: text/plain; charset=UTF-8 Date: Thu, 03 Sep 2009 13:08:56 GMT Expires: Thu, 03 Sep 2009 13:08:56 GMT Cache-Control: private, max-age=0 X-Content-Type-Options: nosniff Content-Length: 120 Connection: close Server: GFE/2.0 [body] => oauth_token=4%2FfdTpOyEZa-EDT_7CW_L6mOordqax&oauth_token_secret=4Smp6yt%2FoP3pRjGiSprkjvoO&oauth_callback_confirmed=true [response] => HTTP/1.1 200 OK Content-Type: text/plain; charset=UTF-8 Date: Thu, 03 Sep 2009 13:08:56 GMT Expires: Thu, 03 Sep 2009 13:08:56 GMT Cache-Control: private, max-age=0 X-Content-Type-Options: nosniff Content-Length: 120 Connection: close Server: GFE/2.0 oauth_token=4%2FfdTpOyEZa-EDT_7CW_L6mOossrdqax&oauth_token_secret=4Smpsss6yt%2FoP3pRjGiSprkjvoO&oauth_callback_confirmed=true ) [status] => Array ( [http-version] => HTTP/1.1 [code] => 200 [reason-phrase] => OK ) [header] => Array ( [Content-Type] => text/plain; charset=UTF-8 [Date] => Thu, 03 Sep 2009 13:08:56 GMT [Expires] => Thu, 03 Sep 2009 13:08:56 GMT [Cache-Control] => private, max-age=0 [X-Content-Type-Options] => nosniff [Content-Length] => 120 [Connection] => close [Server] => GFE/2.0 ) [body] => oauth_token=4%2FfdTpOyEZa-EDT_7CW_L6mOordqax&oauth_token_secret=4Smp6ytss%2FoP3pRjGiSprkjvoO&oauth_callback_confirmed=true [cookies] => )
    0
  • Can someone give me code for working example of fetching yahoo contacts?
    0
  • The response looks like this

    CODE
    HTTP/1.1 200 OK Date: Thu, 03 Sep 2009 14:57:11 GMT P3P: policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV" Connection: close Transfer-Encoding: chunked Content-Type: text/plain; charset=utf-8 f1 oauth_token=kyaact8&oauth_token_secret=bd36e9f99c27472366ac80db5ada07d959be6616&oauth_expires_in=3600&xoauth_request_auth_url=https%3A%2F%2Fapi.login.yahoo.com%2Foauth%2Fv2%2Frequest_auth%3Foauth_token%3Dkyaact8&oauth_callback_confirmed=true 0



    when cakePHP httpSocket class tries to decode the chunked data. it is showing an error

    CODE
    HttpSocket::decodeChunkedBody - Could not parse malformed chunk. Activate quirks mode to do this. [CORE/cake/libs/http_socket.php, line 456]
    0

Recent Posts

in OAuth General Discussion YDN SDKs