Gateway error response is not valid JSON
Bug #1883169 reported by
Ken Cox
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenSRF |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When a GAPINES cron job kills a long-running query, the response includes a truncated "debug" field. Overall the response is not valid JSON.
Mike R helped me track this error to bad string handling in osrf_json_
Also Mike suggests "we could use our safety wrappers there
rather than munging with sprintf ourselves
buff_add etc
search up in the same file for growing_buffer for examples"
tags: | added: cleanup |
Changed in opensrf: | |
milestone: | none → 3.2.2 |
Changed in opensrf: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The attached patch fixes the bug using growing_buffer as suggested. Let me know how it fits for style, I tried to maintain the tabs etc.
Please consider adding my SSH key to the OpenSRF working repo. This is the same one that is alread added to the Evergreen working repo:
ssh-rsa AAAAB3NzaC1yc2E AAAADAQABAAABAQ C8xfl59ziRrWxm8 0VkSebdJk7fAHRz /MhbRCIDOjlHcWv ZN2UH7G5lkEHNUf YTLAX/5yI2mVzd/ 5ag30na4uY0/ F6sIZdf7xAGnclz r2TILx7obvWvG57 NwO4qkzgiyLocsn wHXmXQo2pkK0+ ptzOFLGTT4G48kn MB7Gy/LiJ9yUNaU zOrxsNmBHBMypdA fcdoFwm+ oOeoaFecw92ZHHE 0NT9ZpUYPhAQf0e MZ8m9s6SE5dIyDQ AqeNli3SOzQ2/ 8mqd3fI92rc26aC NdivO26tYEJJxCZ UsRUlYQGRVmBDzU 0hjD60ZVhoYdF49 5ZIK7YUCudMDBNz t/xUd0SxM0X <email address hidden>