]> granicus.if.org Git - php/commitdiff
MFB: Fixed bug #39039 (SSL: fatal protocol error when fetching HTTPS from
authorIlia Alshanetsky <iliaa@php.net>
Thu, 5 Oct 2006 00:38:19 +0000 (00:38 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 5 Oct 2006 00:38:19 +0000 (00:38 +0000)
servers running Google web server).

ext/openssl/xp_ssl.c

index b83db488f1a40b540f6a3563a607b337fcc31aa5..50d372b423f4a76386a1c1443e401b2a9dadbdfa 100644 (file)
@@ -57,17 +57,20 @@ php_stream_ops php_openssl_socket_ops;
  * in an error condition arising from a network connection problem */
 static int is_http_stream_talking_to_iis(php_stream *stream TSRMLS_DC)
 {
-       if (stream->wrapperdata && stream->wrapper && strcmp(stream->wrapper->wops->label, "HTTP") == 0) {
+       if (stream->wrapperdata && stream->wrapper && strcasecmp(stream->wrapper->wops->label, "HTTP") == 0) {
                /* the wrapperdata is an array zval containing the headers */
                zval **tmp;
 
 #define SERVER_MICROSOFT_IIS   "Server: Microsoft-IIS"
+#define SERVER_GOOGLE "Server: GFE/"
                
                zend_hash_internal_pointer_reset(Z_ARRVAL_P(stream->wrapperdata));
                while (SUCCESS == zend_hash_get_current_data(Z_ARRVAL_P(stream->wrapperdata), (void**)&tmp)) {
 
                        if (strncasecmp(Z_STRVAL_PP(tmp), SERVER_MICROSOFT_IIS, sizeof(SERVER_MICROSOFT_IIS)-1) == 0) {
                                return 1;
+                       } else if (strncasecmp(Z_STRVAL_PP(tmp), SERVER_GOOGLE, sizeof(SERVER_GOOGLE)-1) == 0) {
+                               return 1;
                        }
                        
                        zend_hash_move_forward(Z_ARRVAL_P(stream->wrapperdata));