<p>I am trying to configure the HTTP liveness probe as follows:</p>

<pre><code>livenessProbe:
          httpGet:
              path: /rest/sends/get?source=mwTESt2VP3Q9M99GNWYvvaLQ1owrGTTjTb #sends API to test address
              port: 4000
              httpHeaders:
                - name: Authorization
                  value: Basic cnBjOnUzSGRlM0xvaWI1SGpEcTFTZGVoQktpU1NBbHE=
          initialDelaySeconds: 60 #wait this period after staring fist time
          periodSeconds: 30  # polling interval
          timeoutSeconds: 30    # wish to receive response within this time period
</code></pre>

<p>Here, the URL path contains query parameters along with an authentication header (base64 encoding of username:password)</p>

<p>However, I get the following error:</p>

<pre><code> ERROR in app: Exception on /rest/sends/get [GET] (http 500)
</code></pre>

<p>I checked that this indeed works with status code 200 after logging into the pod</p>

<pre><code>curl http://username:password@localhost:4000/rest/sends/get?source=mwTESt2VP3Q9M99GNWYvvaLQ1owrGTTjTb
</code></pre>

<p>This question is probably similar to this one <a href="https://stackoverflow.com/questions/38532286/kubernetes-liveness-probes-with-query-string-parameters?rq=1">Kubernetes liveness probes with query string parameters</a></p>

<p>But, according to it, this should have already been fixed. I am using Kubernetes on <code>Google cloud version: 1.10.7-gke.2</code> on both master and other nodes.</p>

<p>Am I missing something?</p>

<h1>EDIT</h1>

<p>In the server access log, I get the following error</p>

<pre><code>10.0.2.1 - - [10/Oct/2018 03:50:45] "GET /rest/sends/get?source=mwTESt2VP3Q9M99GNWYvvaLQ1owrGTTjTb HTTP/1.1" 500 -
Exception on /rest/sends/get [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1988, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1641, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1544, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.5/dist-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1639, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1625, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python3.5/dist-packages/flask_httpauth.py", line 88, in decorated
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/counterparty_lib-9.55.4-py3.5.egg/counterpartylib/lib/api.py", line 813, in handle_root
    response = handle_rest(rest_path, flask.request)
  File "/usr/local/lib/python3.5/dist-packages/counterparty_lib-9.55.4-py3.5.egg/counterpartylib/lib/api.py", line 935, in handle_rest
    file_format = flask_request.headers['Accept']
  File "/usr/local/lib/python3.5/dist-packages/werkzeug/datastructures.py", line 1354, in __getitem__
    return _unicodify_header_value(self.environ['HTTP_' + key])
KeyError: 'HTTP_ACCEPT'
</code></pre>

<p>The server is actually a counterparty-server <a href="https://github.com/CounterpartyXCP/counterparty-lib" rel="nofollow noreferrer">https://github.com/CounterpartyXCP/counterparty-lib</a></p>

<p>I am not really sure what the problem is.</p>

kosta
<p>I added this header to the request</p>

<pre><code>httpHeaders:
    - name: Authorization 
      value: Basic cnBjOnUzSGRlM0xvaWI1SGpEcTFTZGVoQktpU1NBbHE=
    - name: Accept
      value: application/json
</code></pre>

<p>And now it's working alright.</p>
