Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9159671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:33:03+00:00 2026-06-17T13:33:03+00:00

I am using WordPress’s HTTP API which has a wrapper for cURL (I’ll assume

  • 0

I am using WordPress’s HTTP API which has a wrapper for cURL (I’ll assume it can do everything PHP’s cURL does).

Trying to check the following headers If-None-Match and If-Modified-Since via the API should return:

Status: 304 Not Modified

Instead I am getting a Status: 200 OK

Testing curl from the command line works fine and return the right status, this works:

curl -i https://api.github.com/users/wycks -H 'If-None-Match: "7efeb402e491989a4f37d8d82aae8946"'

Entering the same ETag in PHP 'If-None-Match' => '7efeb402e491989a4f37d8d82aae8946' doesn’t work.

Here is my PHP request to the API:

array
  'method' => string 'HEAD' (length=4)
  'timeout' => int 5
  'redirection' => int 0
  'httpversion' => string '1.0' (length=3)
  'user-agent' => string 'WordPress/3.5; http://dev.local/Foo15' (length=37)
  'blocking' => boolean true
  'headers' => 
    array
      'Accept-Encoding' => string 'deflate;q=1.0, compress;q=0.5' (length=29)
  'cookies' => 
    array
      empty
  'body' => null
  'compress' => boolean false
  'decompress' => boolean true
  'sslverify' => boolean false
  'stream' => boolean false
  'filename' => null
  'If-None-Match' => string '7efeb402e491989a4f37d8d82aae8946' (length=32)
  'Cache-Control' => string 'must-revalidate' (length=15)
  '_redirection' => int 0
  'ssl' => boolean true
  'local' => boolean false
boolean true

And the wrong response:

response' => 
    array
      'code' => int 200
      'message' => string 'OK' (length=2)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:33:05+00:00Added an answer on June 17, 2026 at 1:33 pm

    I am not sure about underlying reasons but from some poking you need to quote etag value inside string:

    'If-None-Match' => '"7efeb402e491989a4f37d8d82aae8946"'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to using wordpress xml-rpc on windows phone 7 but can't find
i'm using wordpress, i have a page that i can access like this http://mywebsite/category/page
I am using Wordpress and it has code like this: <?php if (is_user_logged_in()) {
Does anyone with experience using Wordpress know why it would not use my comments.php
so I'm using Wordpress, which loads the theme and possibly many plugins which can
Im using wordpress 3.0 here: http://www.adventure-service.com On homepage i am using template that creates
I'm using wordpress. I make a ajax call with jQuery, PHP echos out a
I am using WordPress Version 2.9.2 for my blog.when i am trying to include
Using Wordpress I have created a multiple select box so that users can select
I'm currently using WordPress 3.5 on nginx/1.2.6 with PHP-FPM web server setup on my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.