login about faq

Hey I am trying to login a site using PostUrlEncoded but when auth fails i get a null response instead i should get error status.

here is code: httpresponse =httpc.PostUrlEncoded("https://www.xyz.com/resource/UserSessionResource/create/", request);

httpresponse is always null when a 401 is given by the server

this is fiddler request http://prntscr.com/3tchgi

Last Error

ChilkatLog:
  PostUrlEncoded:
    DllDate: Jun 10 2014
    ChilkatVersion: 9.5.0.40
    UnlockPrefix: THEBACHttp
    Username: AKII:Aki
    Architecture: Little Endian; 64-bit
    Language: .NET 4.5 / x64
    VerboseLogging: 0
    url: https://www.pinterest.com/resource/UserSessionResource/create/
    httpRequest:
      httpVersion: 1.1
      verb: GET
      path: /
      contentType: application/x-www-form-urlencoded; charset=UTF-8
      charset: windows-1252
      sendCharset: 0
      mimeHeader: Cache-Control: no-cache
Pragma: no-cache
Accept: application/json, text/javascript, /; q=0.01
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.5
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0
X-Requested-With: XMLHttpRequest
Referer: https://www.pinterest.com/login/
X-APP-VERSION: f2e5001
X-CSRFToken: DwGGvlXmTp3pgpytSrNJfxecuDOnbOcD
X-NEW-APP: 1
      requestParams:
        requestItem:
          name: source_url
          value: /login/
        --requestItem
        requestItem:
          name: data
          value: {"options":{"username_or_email":"Rosemary_they4993@sharklasers.com","password":"bvhz1A_835"},"context":{}}
        --requestItem
        requestItem:
          name: module_path
          value: App()>LoginPage()>Login()>Button(class_name=primary, text=Log In, type=submit, size=large)
        --requestItem
      --requestParams
    --httpRequest
    fullRequest:
      a_synchronousRequest:
        generateRequest:
          httpRequestGenStartLine:
            genStartLine:
              startLine: POST /resource/UserSessionResource/create/ HTTP/1.1
            --genStartLine
          --httpRequestGenStartLine
          addCookies:
            Auto-adding any accumulated cookies.
            CookieDir: memory
            CookieDomain: www.pinterest.com
            CookiePath: /resource/UserSessionResource/create/
            LoadCookieJar:
              Path: /resource/UserSessionResource/create/
              GetDomainCookiesXml:
                CookieDir: memory
                Domain: www.pinterest.com
                HashKey: pinterest_com.xml
              --GetDomainCookiesXml
            --LoadCookieJar
            AddingCookie: csrftoken=DwGGvlXmTp3pgpytSrNJfxecuDOnbOcD; _pinterest_sess="eJwLNC4yME339nMtzy9NtbQI89Y3czP2Tg9zDY60tY8vycxNtfUNCSz3rXI09qtKLvcNtLVVK04tLs5MsfXMSq7wDfHL8suKNI3M8sr1cwGqc8nI8AsBqjXyNPYPCa30Cw819QtJNvFMt7UFAF8dItQ="
          --addCookies
        --generateRequest
        fullHttpRequest:
          domain: www.pinterest.com
          port: 443
          ssl: 1
          openHttpConnection:
            Opening connection through an HTTP proxy.
            proxyDomain: 127.0.0.1
            proxyPort: 8888
            httpHostname: www.pinterest.com
            httpPort: 443
            ssl: 1
            socket2Connect:
              httpProxyConnect:
                proxyHostname: 127.0.0.1
                proxyPort: 8888
                No proxy authentication method specified.
                connectRequest: CONNECT www.pinterest.com:443 HTTP/1.1
Connection: Keep-Alive
Proxy-Connection: Keep-Alive
Host: www.pinterest.com
                connectResponseHeader: HTTP/1.1 200 Connection Established
FiddlerGateway: Direct
StartTime: 13:18:23.825
Connection: close
                firstLine: HTTP/1.1 200 Connection Established
              --httpProxyConnect
              checkServerCert:
                Not verifying server certificate...
                Set the RequireSslCertVerify property to enable verification.
              --checkServerCert
              Secure Channel Established.
            --socket2Connect
            connectElapsedMs: 328
            HTTP connection succeeded.
          --openHttpConnection
          connectTime: Elapsed time: 328 millisec
          sendRequestHeader:
            sendHeaderElapsedMs: 0
          --sendRequestHeader
          sendRequestBody:
            sendBodyElapsedMs: 0
          --sendRequestBody
          statusCode: 401
          statusText: UNAUTHORIZED
          readResponseBody:
            contentLength: 280
          --readResponseBody
          checkUngzipResponse:
            decompressing GZIP response...
          --checkUngzipResponse
        --fullHttpRequest
        computeAuthorization:
          No useful WWW-Authenticate response header was found.
        --computeAuthorization
        computeAuthorization failed (2).
        success: 0
      --a_synchronousRequest
    --fullRequest
    Failed.
  --PostUrlEncoded
--ChilkatLog

Response is null http://prntscr.com/3tyytg

asked Jun 16 '14 at 08:32

aki003's gravatar image

aki003
16224

edited Jun 18 '14 at 03:52


This was a problem in older versions of Chilkat but should not be an issue in the latest version.

link

answered Jun 16 '14 at 16:59

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

This does not work. I am using latest 9.5.40 that is build on 10th june

(Jun 17 '14 at 09:25) aki003

Can you post the contents of the LastErrorText property (in <pre> tags) immediately after you call PostUrlEncoded. There might be some useful information there.

Also what programming language and library build type (e.g. ActiveX, .Net, etc...) are you using?

(Jun 17 '14 at 10:12) jpbro ♦

Hey i have updated question with error as you asked, i am using c# .net module

(Jun 18 '14 at 03:53) aki003

Thanks! This helps. I'll have a look..

(Jun 18 '14 at 11:56) chilkat ♦♦

Please acknowledge the issue atleast.

Thanks

(Jun 19 '14 at 03:20) aki003

This has since been fixed. Any Chilkat HTTP method that returns an HTTP response object should return the object if any valid HTTP response was received, regardless of the success/failure of the HTTP response code. You'll need a pre-release because this was the first change after the v9.5.0.44 release.

link

answered Oct 06 '14 at 09:28

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×186

Asked: Jun 16 '14 at 08:32

Seen: 1,514 times

Last updated: Oct 06 '14 at 09:28

powered by OSQA