Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3460068
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:11:06+00:00 2026-05-18T10:11:06+00:00

Quick version: Do the names of parameters of forms being sent using the standard

  • 0

Quick version: Do the names of parameters of “forms” being sent using the standard multipart/form-data encoding need to be encoded?

Longer version: The upload form on 1fichier.com (a service to upload large files) uses the following to specify the file parameter to upload:

<input type="file" name="file[]" size="50" title="Select the files to upload" />

The name of the parameter is file[] (notice the brackets).

Using LiveHTTPHeaders I see that the parameter is sent like this (i.e. with brackets) when submitting the form in Firefox. However, for a program I’m writing in Python, I am using the poster module to be able to upload files using the standard multipart/form-data encoding. If I enter the parameter name with the brackets, it gets sent like this:

file%5B%5D

Internally, poster encodes the names of the parameters using this function:

def encode_and_quote(data):
    """If ``data`` is unicode, return urllib.quote_plus(data.encode("utf-8"))
    otherwise return urllib.quote_plus(data)"""
    if data is None:
        return None

    if isinstance(data, unicode):
        data = data.encode("utf-8")
    return urllib.quote_plus(data)

The urllib.quote_plus documentation says that this is only “required for quoting HTML form values when building up a query string to go into a URL”. But here we’re doing a POST, so the form values don’t go in the url.

So, do they still need to be encoded, or is it an error of poster to be doing this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T10:11:07+00:00Added an answer on May 18, 2026 at 10:11 am

    RFC 2388 covers multipart/form-data submissions. Section 3 specifies that parameter names should be either ASCII or encoded as per RFC 2047.

    So if your POST request is encoded as multipart/form-data (which poster is doing), then no, parameter names don’t need to be encoded this way. I suggest filing a bug with the author (ahem…), he might be willing to fix it in a future release 😉

    A workaround is to set your MultipartParam’s name attribute directly, e.g.

       p.name = 'file[]'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Quick version of my question: Is the only time you need to use lock
I'm using jqGrid's filterToolbar method to let users quick search/filter the grid data. I'm
Quick version: How do I get an image that was generated on the users
Just a quick questions.. I have made an outlook add-in for 2007 version and
I'm wrestling to deserialize the following XML: <?xml version=1.0 encoding=utf-8 ?> <conf name=settings> <item
Just a quick question as I haven't been using jQuery for that long. Is
This got a bit long-winded, so here's the quick version: Why does this cause
That is a quick question: Where can I get PHP's runkit extension for version
Let's consider the following XML Schema: <?xml version=1.0 encoding=UTF-8?> <schema targetNamespace=http://www.example.org/library elementFormDefault=qualified xmlns=http://www.w3.org/2001/XMLSchema xmlns:lib=http://www.example.org/library>
I have a quite big custom made config file I need to extract data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.