Rob Godfrey created PROTON-269: ---------------------------------- Summary: Connect Redirect parsing incorrectly uses position in map rather than value of key Key: PROTON-269 URL: https://issues.apache.org/jira/browse/PROTON-269 Project: Qpid Proton Issue Type: Bug Components: proton-c Reporter: Rob Godfrey
The connection error "redirect" is defined to carry an info map of the following form: The container is no longer available on the current connection. The peer should attempt reconnection to the container using the details provided in the info map. hostname: the hostname of the container. This is the value that should be supplied in the hostname field of the open frame, and during the SASL and TLS negotiation (if used). network-host: the DNS hostname or IP address of the machine hosting the container. port: the port number on the machine hosting the container. However proton-c completely ignores the values of the keys in the info map and instead assumes that network host will be the value in the second key-value pair, and port will be the value in the thirs key-value pair; e.g.: const char *pn_condition_redirect_host(pn_condition_t *condition) { pn_data_t *data = pn_condition_info(condition); pn_data_rewind(data); pn_data_next(data); pn_data_enter(data); pn_data_next(data); pn_data_next(data); pn_data_next(data); pn_data_next(data); pn_bytes_t host = pn_data_get_bytes(data); pn_data_rewind(data); return host.start; } This is incorrect behaviour. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira