Can't set Content-length header for POST method
NickName:Nghia Nguyen Ask DateTime:2011-09-07T18:26:46

Can't set Content-length header for POST method

We had this problem for a while, just this morning I was able to set Content-length header for POST method, but now it doesn't work anymore. Why is it? I haven't done anything, I heard that this is restricted but I could use it just fine yesterday:

request.Headers["Content-Length"] = byteArray.Length.ToString();

Copyright Notice:Content Author:「Nghia Nguyen」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/7332339/cant-set-content-length-header-for-post-method

More about “Can't set Content-length header for POST method” related questions

Can Can for Rails Association

I used can-can gem for managing the roles in my application. The models are as follows class User < ActiveRecord::Base has_many :projects has_and_belongs_to_many :teams end class Pr...

Show Detail

Can can with devise, admin and user

I use cancan and devise, I can update delete and show but I can't create profile. why I can't create new profile ("ActiveModel::ForbiddenAttributesError") class Ability include CanCan::Ability ...

Show Detail

rails 3 can can ability

I am using can can gem to restriction user based on role there is no model for product class ProductsController < ApplicationController authorize_resource :class => false def index ...

Show Detail

GET request can be bookmarked and POST can not . Can anybody explain on this?

I am studying the HTTP methods. I read that GET request can be bookmarked and POST request can not be bookmarked. Can anybody explain this with an example? Thanks

Show Detail

Can not tnsping but can sqlplus connect

I have a question hopefully someone could explain it to me. I have an Oracle 11g installed properly on the server. From a workstation, I have installed the oracle client which tnsname.ora pointed t...

Show Detail

Can Can with Role Model restriction

I'm Trying to achieve that the user can see only HIS applications, and not the "Application Index" containing all the applications from all Users. My Header: <%= link_to "My Application ",

Show Detail

CAN busoff with CAN_High and CAN_Low shorted

It is known fact that short circuiting CAN_High and CAN_Low on a CAN bus leads to a bus off condition. With respect to the physical layer, how does this condition lead to bus off condition?

Show Detail

What is CAN Active, CAN passive and Sleep state in CAN Network manager?

I am trying to understand the CAN network management in vehicle. During my research, I got to know that CAN network management(CANNM) will make some Mode state to decide the CAN transmission. Those...

Show Detail

Where is CAN ID in CAN Message Frame

I am new to the CAN-BUS protocol. So was going through the CAN Bus Specifications and related documents. I have always used the CAN ID and Frame at the application level. CANID like 0x1a1 CAN Fram...

Show Detail

Service can do ,but Asynctask can not?

I have read about difference between Service,Intent Service & Asynctask ,but I have not figured out any situation where only service works but Asynctask fails. I have noticed some points: Asy...

Show Detail