Project

General

Profile

Bug #894

CmdProcessor NullPointerException when query does not include header ' user-agent

Added by Mike Stults almost 7 years ago. Updated almost 6 years ago.

Status:
New
Priority:
Normal
Assignee:
Target version:
Start date:
06/16/2017
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

partial stack trace
java.lang.NullPointerException
java.lang.ProcessEnvironment.validateValue(ProcessEnvironment.java:120)
java.lang.ProcessEnvironment.access$400(ProcessEnvironment.java:61)
java.lang.ProcessEnvironment$Value.valueOf(ProcessEnvironment.java:203)
java.lang.ProcessEnvironment$StringEnvironment.put(ProcessEnvironment.java:243)
java.lang.ProcessEnvironment$StringEnvironment.put(ProcessEnvironment.java:221)
edu.iris.wss.endpoints.CmdProcessor.getProcessingResults(CmdProcessor.java:113)
edu.iris.wss.provider.IrisDynamicProvider.doIrisProcessing(IrisDynamicProvider.java:251)
sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)

python code

import httplib
dom2 = 'service.iris.edu'
path1 = '/fdsnws/dataselect/1/query?nodata=404&net=TA&sta=X59A&loc=--&cha=VM2&start=2013-08-10T21:49:09.563293&end=2013-08-13T23:58:09.563293'
hc = httplib.HTTPConnection(dom2, 80)
hc.request("GET", path1)
r1 = hc.getresponse()
r1.status

500

d1 = r1.read()
len(d1)

4819

headers = {"user-agent": "mypy_agent"}
hc.request("GET", path1, headers=headers)
r1 = hc.getresponse()
r1.status

200

d1 = r1.read()
len(d1)

32768

History

#1 Updated by Mike Stults almost 6 years ago

  • Resolution set to Fixed

2018-05-18 58b2328 - git commit -m "issue 894 - created a default value for user-agent when client does not set a value, updated IncomingHeaders to allow dynamic checking of this header"

#2 Updated by Mike Stults almost 6 years ago

  • Target version set to 2.4.4

2018-05-25 5a3b275 (Mike Stults): (HEAD > master, tag: v2.4.4, origin/master, origin/HEAD) - v2.4.4 for issues 939, 931, 927, 894, 841
uploaded webserviceshell/2.4.4/webserviceshell-2.4.4.jar 8545 KB

Also available in: Atom PDF