[#379] Add Iana CharsetReader for Oracle integration #379

Merged
alexvanin merged 1 commit from pogpp/frostfs-s3-gw:bugfix/update_decoder into master 2024-05-03 07:22:57 +00:00
Member

Signed-off-by: Pavel Pogodaev p.pogodaev@yadro.com

Signed-off-by: Pavel Pogodaev <p.pogodaev@yadro.com>
pogpp changed title from [#] Add Iana CharsetReader for Oracle integration to [#379] Add Iana CharsetReader for Oracle integration 2024-04-24 12:22:24 +00:00
pogpp requested review from dkirillov 2024-04-24 12:24:38 +00:00
pogpp requested review from mbiryukova 2024-04-24 12:24:46 +00:00
pogpp force-pushed bugfix/update_decoder from d880fbd106 to e1c887e6c4 2024-04-24 13:49:19 +00:00 Compare
pogpp force-pushed bugfix/update_decoder from e1c887e6c4 to 48e5ce1d10 2024-04-25 05:25:23 +00:00 Compare
pogpp requested review from r.loginov 2024-04-25 05:26:03 +00:00
dkirillov reviewed 2024-04-25 06:38:44 +00:00
cmd/s3-gw/app.go Outdated
@ -322,6 +323,13 @@ func (s *appSettings) NewXMLDecoder(r io.Reader) *xml.Decoder {
if s.defaultXMLNS {
dec.DefaultSpace = awsDefaultNamespace
}
dec.CharsetReader = func(charset string, reader io.Reader) (io.Reader, error) {
Member

Since setting this field doesn't require any config parameter we can (and should) move assignment out of critical section (mutex)

Since setting this field doesn't require any config parameter we can (and should) move assignment out of critical section (mutex)
dkirillov marked this conversation as resolved
cmd/s3-gw/app.go Outdated
@ -325,0 +326,4 @@
dec.CharsetReader = func(charset string, reader io.Reader) (io.Reader, error) {
enc, err := ianaindex.IANA.Encoding(charset)
if err != nil {
return nil, fmt.Errorf("charset %s: %s", charset, err.Error())
Member

Let's write

return nil, fmt.Errorf("charset %s: %w", charset, err)
Let's write ```golang return nil, fmt.Errorf("charset %s: %w", charset, err) ```
dkirillov marked this conversation as resolved
@ -37,0 +38,4 @@
<CompleteMultipartUpload>
<Part>
<PartNumber>1</PartNumber>
<ETag>
Member

It's better write like this

<ETag>8b73814bee405ec32b5d1fc88cd5d97a</ETag>
It's better write like this ```golang <ETag>8b73814bee405ec32b5d1fc88cd5d97a</ETag> ```
dkirillov marked this conversation as resolved
pogpp force-pushed bugfix/update_decoder from 48e5ce1d10 to de09c0bf67 2024-04-25 06:53:00 +00:00 Compare
pogpp force-pushed bugfix/update_decoder from de09c0bf67 to 4f99dc1a68 2024-04-25 14:23:17 +00:00 Compare
dkirillov approved these changes 2024-04-25 14:38:22 +00:00
dkirillov left a comment
Member

Please update changelog

Please update changelog
pogpp force-pushed bugfix/update_decoder from 4f99dc1a68 to db05021786 2024-04-25 14:44:52 +00:00 Compare
pogpp requested review from dkirillov 2024-04-25 14:45:53 +00:00
dkirillov approved these changes 2024-04-26 06:49:43 +00:00
mbiryukova approved these changes 2024-04-26 08:19:24 +00:00
ironbee approved these changes 2024-05-02 07:17:19 +00:00
alexvanin approved these changes 2024-05-03 07:22:50 +00:00
alexvanin merged commit db05021786 into master 2024-05-03 07:22:57 +00:00
alexvanin deleted branch bugfix/update_decoder 2024-05-03 07:22:57 +00:00
alexvanin added this to the v0.30.0 milestone 2024-05-27 11:08:09 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
5 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-s3-gw#379
No description provided.