Skip to content

Commit dfc40e8

Browse files
committed
fix: Resolve bug in header parsing when parsing multi-item headers
1 parent 3d1837e commit dfc40e8

6 files changed

Lines changed: 106 additions & 106 deletions

File tree

modules/openapi-generator/src/main/resources/rust-server/models.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderVal
653653
match hdr_values.to_str() {
654654
std::result::Result::Ok(hdr_values) => {
655655
let hdr_values : std::vec::Vec<{{{classname}}}> = hdr_values
656-
.split(',')
656+
.split(", ")
657657
.filter_map(|hdr_value| match hdr_value.trim() {
658658
"" => std::option::Option::None,
659659
hdr_value => std::option::Option::Some({

samples/server/petstore/rust-server/output/multipart-v3/src/models.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderVal
166166
match hdr_values.to_str() {
167167
std::result::Result::Ok(hdr_values) => {
168168
let hdr_values : std::vec::Vec<MultipartRelatedRequest> = hdr_values
169-
.split(',')
169+
.split(", ")
170170
.filter_map(|hdr_value| match hdr_value.trim() {
171171
"" => std::option::Option::None,
172172
hdr_value => std::option::Option::Some({
@@ -338,7 +338,7 @@ impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderVal
338338
match hdr_values.to_str() {
339339
std::result::Result::Ok(hdr_values) => {
340340
let hdr_values : std::vec::Vec<MultipartRequestObjectField> = hdr_values
341-
.split(',')
341+
.split(", ")
342342
.filter_map(|hdr_value| match hdr_value.trim() {
343343
"" => std::option::Option::None,
344344
hdr_value => std::option::Option::Some({
@@ -504,7 +504,7 @@ impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderVal
504504
match hdr_values.to_str() {
505505
std::result::Result::Ok(hdr_values) => {
506506
let hdr_values : std::vec::Vec<MultipleIdenticalMimeTypesPostRequest> = hdr_values
507-
.split(',')
507+
.split(", ")
508508
.filter_map(|hdr_value| match hdr_value.trim() {
509509
"" => std::option::Option::None,
510510
hdr_value => std::option::Option::Some({

samples/server/petstore/rust-server/output/no-example-v3/src/models.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ impl std::convert::TryFrom<hyper::header::HeaderValue> for header::IntoHeaderVal
146146
match hdr_values.to_str() {
147147
std::result::Result::Ok(hdr_values) => {
148148
let hdr_values : std::vec::Vec<OpGetRequest> = hdr_values
149-
.split(',')
149+
.split(", ")
150150
.filter_map(|hdr_value| match hdr_value.trim() {
151151
"" => std::option::Option::None,
152152
hdr_value => std::option::Option::Some({

0 commit comments

Comments
 (0)