yiisoft / yii-web

Yii web components
https://www.yiiframework.com/
BSD 3-Clause "New" or "Revised" License
78 stars 46 forks source link

Response with attachment #174

Closed kamarton closed 3 years ago

kamarton commented 4 years ago

I suggests

Implementing to HttpHelper.

Q A
Version 3.0.x-dev
PHP version -
Operating system -
samdark commented 4 years ago

I'd suggest a separate class instead of putting it into a single large helper.

samdark commented 4 years ago

See https://github.com/yiisoft/yii-web/blob/master/src/Cookie.php

kamarton commented 4 years ago

https://github.com/yiisoft/yii-web/pull/185#issuecomment-560321613

kamarton commented 4 years ago
# RFC 2231/5987 Encoding: Character Sets
'2231iso' => ["filename=iso-8859-1''foo-%E4.html",null, null, ['filename' => 'foo-ä.html']],
'2231utf' => ["filename=UTF-8''foo-%c3%a4-%e2%82%ac.html",null, null, ['filename' => 'foo-ä-€.html']],
'2231noc' => ["filename=''foo-%c3%a4-%e2%82%ac.html", null,null, null, \InvalidArgumentException::class],
rustamwin commented 4 years ago

What about implement in yiisoft/http?

yus-ham commented 4 years ago

Maybe

samdark commented 4 years ago

@sup-ham how do you plan to use middleware there?

samdark commented 3 years ago

https://github.com/yiisoft/http#contentdispositionheader-usage