]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix parsing of the headers
authorVsevolod Stakhov <vsevolod@rspamd.com>
Wed, 8 Jun 2022 19:21:17 +0000 (20:21 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Wed, 8 Jun 2022 19:21:17 +0000 (20:21 +0100)
src/client/rspamc.cxx

index 0c4c2663f9f1ae3229b93b20cce06368a356f6d1..bdcbb0d2dc0ec80bfe61c52a113995f50dd0ba40 100644 (file)
@@ -703,8 +703,8 @@ add_options(GQueue *opts)
                }
                else {
                        add_client_header(opts,
-                                       hdr_view.substr(0, std::distance(delim_pos, std::begin(hdr_view))),
-                                       hdr_view.substr(std::distance(delim_pos, std::begin(hdr_view) + 1)));
+                                       hdr_view.substr(0, std::distance(std::begin(hdr_view), delim_pos)),
+                                       hdr_view.substr(std::distance(std::begin(hdr_view), delim_pos) + 1));
                }
 
                hdr++;