411 Length Required

I use CGridView. It has Delete buttons (CButtonColumn) for every row. When I click Delete button, it asks me, if i would like to delete this entry. I click Yes, and I get server error:

411 Length Required

nginx/0.4.13

It means that Nginx can not process requests with empty Content-Length field.

Only one solution that I have found is to add ‘data’ [data: ’ '] parameter to ajax post request. In CButtonColumn.php:




...

$this->buttons['delete']['click']=<<<EOD

function() {

	$confirmation

	$.fn.yiiGridView.update('{$this->grid->id}', {

		type:'POST',

		data: ' ',

		url:$(this).attr('href'),$csrf

		success:function() {

			$.fn.yiiGridView.update('{$this->grid->id}');

		}

	});

	return false;

}

EOD;

...



Is it correct or are there any good solution?

Firefox

Yii Framework 1.1.3