Bug #1185
escaped '+' in PID double-decoded to space, throwing error for mn.create()
100%
Description
mn.create throwing an error for identifiers with + in them. From integration tests:
PID: knb:testid:2011411433148_common-unicode-ascii-escape-space-v-plus-+ +%20 %20+
restURL: http://cn-dev.dataone.org/knb/d1/object/knb:testid:2011411433148_common-unicode-ascii-escape-space-v-plus-%2B%20%2B%2520%20%2520%2B?sessionid=3F9F894A8AFA9645557C5439A0201841
method: POST
returns
tried to get content and failed. Receiving an error stream instead.
error message: GUID in method call (knb:testid:2011411433148_common-unicode-ascii-escape-space-v-plus- %20 %20 )
does not match GUID in system metadata (knb:testid:2011411433148_common-unicode-ascii-escape-space-v-plus-+ +%20 %20+).
syslog yields:
root@cn-dev:/var/log# tail '-1500 syslog | grep 2011411433148_common-unicode
Jan 4 11:04:46 cn-dev jsvc.exec[30663]: In D1URLFilter.#012request uri: /knb/d1/object/knb:testid:2011411433148_common-unicode-ascii-escape-
space-v-plus-+%20+%2520%20%2520+#012HTTP Verb: POST#012handling verb 2 request with resource 'object'#012sessionData:
edu.ucsb.nceas.metacat.util.SessionData@48805ebb#012username: uid=kepler,o=unaffiliated,dc=ecoinformatics,dc=org#012sessionid:
3F9F894A8AFA9645557C5439A0201841#012setting sessionid to 3F9F894A8AFA9645557C5439A0201841#012username:
uid=kepler,o=unaffiliated,dc=ecoinformatics,dc=org
Jan 4 11:04:46 cn-dev jsvc.exec[30663]: Using resource 'object'#012sessionData: edu.ucsb.nceas.metacat.util.SessionData@48805ebb#012username:
uid=kepler,o=unaffiliated,dc=ecoinformatics,dc=org#012sessionid: 3F9F894A8AFA9645557C5439A0201841#012setting sessionid to
3F9F894A8AFA9645557C5439A0201841#012username: uid=kepler,o=unaffiliated,dc=ecoinformatics,dc=org#012original pathInfo:
/knb:testid:2011411433148_common-unicode-ascii-escape-space-v-plus-+ +%20 %20+#012new pathinfo: /knb:testid:2011411433148_common-unicode-ascii-
escape-space-v-plus- %20 %20 #012original pathInfo: /knb:testid:2011411433148_common-unicode-ascii-escape-space-v-plus-+ +%20 %20+#012new
pathinfo: /knb:testid:2011411433148_common-unicode-ascii-escape-space-v-plus- %20 %20 #012objectId in ReasourceHandler.handle:
knb:testid:2011411433148_common-unicode-ascii-escape-space-v-plus- %20 %20
Jan 4 11:04:46 cn-dev jsvc.exec[30663]: creating object with guid knb:testid:2011411433148_common-unicode-ascii-escape-space-v-plus- %20 %20
#012org.dataone.service.exceptions.InvalidSystemMetadata: GUID in method call (knb:testid:2011411433148_common-unicode-ascii-escape-space-v-plus- %20
%20 ) does not match GUID in system metadata (knb:testid:2011411433148_common-unicode-ascii-escape-space-v-plus-+ +%20 %20+).#012#011at
edu.ucsb.nceas.metacat.dataone.CrudService.create(CrudService.java:304)#012#011at
edu.ucsb.nceas.metacat.restservice.ResourceHandler.putObject(ResourceHandler.java:1585)#012#011at
edu.ucsb.nceas.metacat.restservice.ResourceHandler.handle(ResourceHandler.java:353)#012#011at
edu.ucsb.nceas.metacat.restservice.RestServlet.doPost(RestServlet.java:70)#012#011at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)#012#011at
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)#012#011at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)#012#011at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)#012#011at java.lang.reflect.Met
Related issues
History
#1 Updated by Rob Nahf about 14 years ago
- Subject changed from double-slash compressed to single in mn.create() to escaped '+' in PIDs throw error for mn.create()
- Priority changed from Normal to Urgent
- Assignee set to Chad Berkley
#2 Updated by Rob Nahf about 14 years ago
- Subject changed from escaped '+' in PIDs throw error for mn.create() to escaped '+' in PID double-decoded to space, throwing error for mn.create()
#3 Updated by Rob Nahf about 14 years ago
- Category set to Metacat
#4 Updated by Rob Nahf about 14 years ago
think we found the problem - see related issue #1187
#5 Updated by Chad Berkley about 14 years ago
- Status changed from New to Closed