Skip to content

Incorrect return value from ShowMapEntries if map entry contain space #135

@sgrzer

Description

@sgrzer

Hi

Using v6.2.6

The runtime.parseMapEntry function in runtime/maps.go extract parts from entries but does not correctly handle spaces in map values.

/etc/haproxy/maps/redirects.map
/mykey value with spaces

echo "show map /etc/haproxy/maps/redirects.map" | socat stdio haproxy_run/admin.sock
0x56310b5da3a0 /mykey value with spaces

client.ShowMapEntries("/etc/haproxy/maps/redirects.map")
models.MapEntries len: 1, cap: 2, [*{ID: "0x5590158893a0", Key: "/mykey", Value: "value"}]

should be:
models.MapEntries len: 1, cap: 2, [*{ID: "0x5590158893a0", Key: "/mykey", Value: "value with space"}]

Thanks
Sebastien

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions