79 lines
2.2 KiB
Diff
79 lines
2.2 KiB
Diff
From 530650958e4801374827cf3bbbc95b3fbf3e89d2 Mon Sep 17 00:00:00 2001
|
|
From: Remi Collet <remi@php.net>
|
|
Date: Mon, 1 Sep 2014 13:48:46 +0200
|
|
Subject: [PATCH] skip this test for offline build
|
|
|
|
---
|
|
tests/client015.phpt | 1 +
|
|
1 file changed, 1 insertion(+)
|
|
|
|
diff --git a/tests/client015.phpt b/tests/client015.phpt
|
|
index 35981a5..60d3132 100644
|
|
--- a/tests/client015.phpt
|
|
+++ b/tests/client015.phpt
|
|
@@ -10,6 +10,7 @@ try {
|
|
} catch (Exception $e) {
|
|
die("skip ".$e->getMessage());
|
|
}
|
|
+skip_online_test();
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
--
|
|
1.8.3.1
|
|
|
|
diff --git a/php_http_etag.c b/php_http_etag.c
|
|
index 4562324..3604ad8 100644
|
|
--- a/php_http_etag.c
|
|
+++ b/php_http_etag.c
|
|
@@ -61,11 +61,15 @@ char *php_http_etag_finish(php_http_etag_t *e)
|
|
unsigned char buf[4];
|
|
|
|
*((uint *) e->ctx) = ~*((uint *) e->ctx);
|
|
+#ifdef WORDS_BIGENDIAN
|
|
+ etag = php_http_etag_digest((unsigned char *) e->ctx, 4);
|
|
+#else
|
|
buf[0] = ((unsigned char *) e->ctx)[3];
|
|
buf[1] = ((unsigned char *) e->ctx)[2];
|
|
buf[2] = ((unsigned char *) e->ctx)[1];
|
|
buf[3] = ((unsigned char *) e->ctx)[0];
|
|
etag = php_http_etag_digest(buf, 4);
|
|
+#endif
|
|
} else if ((!strcasecmp(e->mode, "sha1"))) {
|
|
PHP_SHA1Final(digest, e->ctx);
|
|
etag = php_http_etag_digest(digest, 20);
|
|
From 906ccdd174554232371d4f50db47e0817fd91789 Mon Sep 17 00:00:00 2001
|
|
From: Remi Collet <remi@php.net>
|
|
Date: Wed, 3 Sep 2014 15:31:33 +0200
|
|
Subject: [PATCH 3/3] fix httpVersion retrieval on bigendian
|
|
|
|
---
|
|
php_http_message.c | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/php_http_message.c b/php_http_message.c
|
|
index 70dcae8..3141065 100644
|
|
--- a/php_http_message.c
|
|
+++ b/php_http_message.c
|
|
@@ -941,6 +941,7 @@
|
|
HashTable *props = zend_get_std_object_handlers()->get_properties(object TSRMLS_CC);
|
|
zval array, *parent, *body;
|
|
char *version;
|
|
+ int verlen;
|
|
|
|
PHP_HTTP_MESSAGE_OBJECT_INIT(obj);
|
|
|
|
@@ -965,7 +964,8 @@
|
|
} while(0)
|
|
|
|
ASSOC_PROP(long, "type", msg->type);
|
|
- ASSOC_STRINGL_EX("httpVersion", version, spprintf(&version, 0, "%u.%u", msg->http.version.major, msg->http.version.minor), 0);
|
|
+ verlen = spprintf(&version, 0, "%u.%u", msg->http.version.major, msg->http.version.minor);
|
|
+ ASSOC_STRINGL_EX("httpVersion", version, verlen, 0);
|
|
|
|
switch (msg->type) {
|
|
case PHP_HTTP_REQUEST:
|
|
--
|
|
1.8.3.1
|
|
|