Permalink
Browse files

Set schema version by default

  • Loading branch information...
johnj committed Dec 17, 2012
1 parent ceb47c6 commit ff0ec849370214d33c50e9cc8f748498835a2578
Showing with 1 addition and 1 deletion.
  1. +1 −1 xcom.c
View
2 xcom.c
@@ -429,7 +429,7 @@ static void* php_xcom_send_msg_common(INTERNAL_FUNCTION_PARAMETERS, int async) {
snprintf(auth_hdr, sizeof(auth_hdr), "Authorization: %s", xcom->cap_token);
}
- if(SUCCESS!=zend_hash_find(HASH_OF(hdrs), "X-XC-SCHEMA-VERSION", sizeof("X-XC-SCHEMA-VERSION"), (void *)&tmp)) {
+ if(!hdrs || SUCCESS!=zend_hash_find(HASH_OF(hdrs), "X-XC-SCHEMA-VERSION", sizeof("X-XC-SCHEMA-VERSION"), (void *)&tmp)) {
snprintf(schema_ver_hdr, sizeof(schema_ver_hdr), "X-XC-SCHEMA-VERSION: %s", "1.0.0");
}

0 comments on commit ff0ec84

Please sign in to comment.