Skip to content

Content-Length is required for certain org's login when using loginBySoap #1704

Open

Description

@mayashavin

** Steps to reproduce**:

  • Log in using username and password for development Salesforce org.

Expected

  • Login successfully

Actual:

  • Failed login with error "Content-Length is required".

Proposed fix:

  • Add 'Content-Length': Buffer.byteLength(body).toString(), to loginBySoap().

Activity

  1. cristiand391 commented on May 26, 2025

    @cristiand391
    Contributor

    @mayashavin I see you work at salesforce, are you getting this error in an internal environment? we use loginBySoap in e2e tests and it's been working fine.

  2. mayashavin commented on May 26, 2025

    @mayashavin
    Author

    Yes, this error only happens on an internal environment. It works well with normal environment. But we works heavily with internal environments so we need this fix :( @cristiand391

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions