Closed
Description
Q | A |
---|---|
Bug? | yes |
New Feature? | no |
Version | 69e4723 |
Actual Behavior
I'm writing a proxy script where I have to parse the set-cookie headers sent back by the upstream servers. Sometimes the upstream server (out of my control) send a cookie with invalid characters in name and/or value and when I try to parse it the library throws an \InvalidArgumentException
Expected Behavior
I'd like to make this validation optional
Steps to Reproduce
use Http\Discovery\HttpClientDiscovery;
use Http\Message\CookieJar;
use Http\Client\Common\PluginClient;
use Http\Client\Common\Plugin\CookiePlugin;
use Http\Client\Curl\Client;
use Http\Message\MessageFactory\DiactorosMessageFactory;
use Http\Message\StreamFactory\DiactorosStreamFactory;
$messageFactory = new DiactorosMessageFactory();
$pluginClient = new PluginClient(
new Client($messageFactory, new DiactorosStreamFactory()),
[new CookiePlugin(new CookieJar())]
);
$response = $pluginClient->sendRequest(
$messageFactory->createRequest('GET', 'http://www.micromedexsolutions.com/home/dispatch')
);
Metadata
Metadata
Assignees
Labels
No labels