HTTP Requests: variable parsing in quoted header values

I've a request like:

### Create
Content-Type: multipart/form-data; boundary=WebAppBoundary
Authorization: Bearer YOURTOKENHERE
Alvaro-Test: {{$timestamp}}

Content-Disposition: form-data; name="file"; filename="Create {{$timestamp}}.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

< /home/alvaro/Data/Create.xlsx

The {{$timestamp}} variable is being properly parsed everywhere except in the Content-Disposition header. By trial and error, I discovered it's because it's inside a quoted string. This does work:

Content-Disposition: form-data; name="file"; filename=Create_{{$timestamp}}.xlsx

Is it the intended behaviour? Is there a syntax to have both spaces and variables in the filename attribute?


Please sign in to leave a comment.