Project

General

Profile

Actions

Feature #7684

closed

Net::HTTPHeader#set_form_data should accept a String

Added by postmodern (Hal Brodigan) almost 12 years ago. Updated almost 12 years ago.

Status:
Rejected
Target version:
[ruby-core:51375]

Description

I noticed that Net::HTTPHeader#set_form_data does not accept already encoded form-data, but instead passes an Array/Hash down to URI.encode_www_form.


Files

set_form_data_string.diff (579 Bytes) set_form_data_string.diff injekt (Lee Jarvis), 01/11/2013 10:03 PM

Updated by injekt (Lee Jarvis) almost 12 years ago

You could just set the content body yourself. But I see no reason why set_form_data shouldn't accept a string either

Updated by ko1 (Koichi Sasada) almost 12 years ago

  • Assignee set to naruse (Yui NARUSE)
  • Target version set to 2.6

Is it a feature request?

Updated by drbrain (Eric Hodel) almost 12 years ago

  • Tracker changed from Bug to Feature

If it didn't work this way before I think it is a feature request.

Updated by naruse (Yui NARUSE) almost 12 years ago

  • Status changed from Open to Rejected

Such backdoor breaks the convention that this method returns a valid application/x-www-form-urlencoded string.

You should set it directly to body.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0