<notes><![CDATA[
* Fixed bug #68353 (QsoSSL support removed in libcurl 7.39)
* Fixed bug #68149 (duplicate content-length with libcurl < 7.23)
+* Fixed bug #66891 (Unexpected HTTP 401 after NTLM authentication)
]]></notes>
<contents>
<dir name="/">
return ret;
}
+ if ((zoption = get_option(options, ZEND_STRL("headers") TSRMLS_CC))) {
+ if (Z_TYPE_P(zoption) == IS_ARRAY) {
+ php_http_header_to_callback(Z_ARRVAL_P(zoption), 0, (php_http_pass_format_callback_t) r->ops->set_header, r TSRMLS_CC);
+ }
+ zval_ptr_dtor(&zoption);
+ }
+
+ if (ret != SUCCESS) {
+ return ret;
+ }
+
if ((zoption = get_option(options, ZEND_STRL("responseCode") TSRMLS_CC))) {
zval *zoption_copy = php_http_ztyp(IS_LONG, zoption);
return ret;
}
- if ((zoption = get_option(options, ZEND_STRL("headers") TSRMLS_CC))) {
- if (Z_TYPE_P(zoption) == IS_ARRAY) {
- php_http_header_to_callback(Z_ARRVAL_P(zoption), 0, (php_http_pass_format_callback_t) r->ops->set_header, r TSRMLS_CC);
- }
- zval_ptr_dtor(&zoption);
- }
-
- if (ret != SUCCESS) {
- return ret;
- }
-
if ((zoption = get_option(options, ZEND_STRL("contentType") TSRMLS_CC))) {
zval *zoption_copy = php_http_ztyp(IS_STRING, zoption);
--- /dev/null
+--TEST--
+Bug #66891 (Unexpected HTTP 401 after NTLM authentication)
+--SKIPIF--
+<?php
+include "skipif.inc";
+?>
+--GET--
+dummy=1
+--FILE--
+<?php
+header("WWW-Authenticate: none");
+$r = new http\Env\Response;
+$r->setResponseCode(200);
+$r->send();
+var_dump(http_response_code());
+?>
+--EXPECT--
+int(200)
\ No newline at end of file