Skip to content

Javascript conversion crashes during multipart form data #88

Closed

Description

@Karthik-M-L

Hi,

In javascript code generation template you are doing deletion of content type header in case of multi part form data. Code crashes saying "Cannot read property 'indexOf' of undefined" if javascript conversion is called twice and if same snippet is converted to other language content header will be missing.
Ex:
var snippet = new HTTPSnippet(data);
console.log(snippet.convert('javascript'));
console.log(snippet.convert('javascript'));

Regards,
Karthik M L

Activity

  1. ahmadnassri commented on Nov 29, 2016

    @ahmadnassri

    can you provide an example?

  2. self-assigned this
    on Nov 29, 2016
  3. Karthik-M-L commented on Dec 12, 2016

    @Karthik-M-L
    Author

    Any post request with postdata having mimetype multipart formdata will do.
    If you want HAR i can give you

  4. dimitropoulos commented on Jul 19, 2022

    @dimitropoulos
    Contributor

    There are no longer any .indexOf calls in any JavaScript target. If someone can reproduce this today (post #248) then please let me know and we'll take a look.

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