Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close Response body input stream after printing it to socket's output stream? #838

Closed
jimkast opened this issue May 17, 2018 · 28 comments
Closed

Comments

@jimkast
Copy link

jimkast commented May 17, 2018

Currently, BkBasic uses RsPrint to send response bytes to socket's output stream.
However, RsPrint does not close input stream, which may be a File (FileInputStream) as in TkFiles case.
Should RsPrint close the input stream to avoid issues with resources?
Or maybe a BkBasic constructor accept a Func<Response, OutputBytes> which will be RsPrint by default in a secondary constructor?

public interface OutputBytes {
    void print(OutputStream output);
}
@0crat
Copy link
Collaborator

0crat commented May 17, 2018

@yegor256/z please, pay attention to this issue

@0crat
Copy link
Collaborator

0crat commented May 17, 2018

@jimkast/z this project will fix the problem faster if you donate a few dollars to it; just click here and pay via Stripe, it's very fast, convenient and appreciated; thanks a lot!

@yegor256
Copy link
Owner

@jimkast I think RsPrint should close the stream

@yegor256
Copy link
Owner

@jimkast feel free to contribute with a PR.

@paulodamaso
Copy link
Contributor

@0crat status

@0crat
Copy link
Collaborator

0crat commented Oct 17, 2018

@0crat status (here)

@paulodamaso This is what I know about this job in C3FFK3YAY, as in §32:

@paulodamaso
Copy link
Contributor

@0crat in

@0crat 0crat added the scope label Oct 17, 2018
@0crat
Copy link
Collaborator

0crat commented Oct 17, 2018

@0crat in (here)

@paulodamaso Job #838 is now in scope, role is DEV

@0crat
Copy link
Collaborator

0crat commented Oct 17, 2018

@0crat in (here)

@paulodamaso Thanks for your contribution, @jimkast/z! If you would be a member of the project, you would now earn +15 reputation points, as explained in §29. You can join and apply to it, see §2.

@0crat
Copy link
Collaborator

0crat commented Nov 30, 2018

The job #838 assigned to @olenagerasimova/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be a monetary reward for this job

olenagerasimova pushed a commit to olenagerasimova/takes that referenced this issue Dec 1, 2018
@olenagerasimova
Copy link
Contributor

@0crat wait for review/merge of PR #879

@0crat
Copy link
Collaborator

0crat commented Dec 1, 2018

@0crat wait for review/merge of PR #879 (here)

@olenagerasimova The impediment for #838 was registered successfully by @olenagerasimova/z

olenagerasimova added a commit to olenagerasimova/takes that referenced this issue Dec 4, 2018
olenagerasimova added a commit to olenagerasimova/takes that referenced this issue Dec 6, 2018
@olenagerasimova
Copy link
Contributor

@jimkast fixed in #879 please close

@jimkast jimkast closed this as completed Dec 6, 2018
@0crat
Copy link
Collaborator

0crat commented Dec 6, 2018

@ypshenychka/z please review this job completed by @olenagerasimova/z, as in §30; the job will be fully closed and all payments will be made when the quality review is completed

@0crat 0crat removed the scope label Dec 6, 2018
@0crat
Copy link
Collaborator

0crat commented Dec 6, 2018

The job #838 is now out of scope

@ypshenychka
Copy link

@0crat quality good

@paulodamaso
Copy link
Contributor

@rultor release, tag is 1.11.4

@rultor
Copy link
Collaborator

rultor commented Dec 6, 2018

@rultor release, tag is 1.11.4

@paulodamaso OK, I will release it now. Please check the progress here

@rultor
Copy link
Collaborator

rultor commented Dec 6, 2018

@rultor release, tag is 1.11.4

@jimkast @paulodamaso Oops, I failed. You can see the full log here (spent 2min)

+ cd repo
+ git config user.email me@rultor.com
+ git config user.name rultor
+ '[' -z 'export '\''MAVEN_OPTS=-XX:MaxPermSize=256m -Xmx1g'\''' ']'
+ cd ..
+ cat
+ '[' false = true ']'
+ cat
+ chmod a+x entry.sh
+ cat
+ echo 'export '\''MAVEN_OPTS=-XX:MaxPermSize=256m -Xmx1g'\''' ';' 'export '\''JAVA_OPTS=-XX:MaxPermSize=256m -Xmx1g'\''' ';' 'export '\''head=git@github.com:yegor256/takes.git'\''' ';' 'export '\''head_branch=master'\''' ';' 'export '\''author=paulodamaso'\''' ';' 'sudo locale-gen en_US en_US.UTF-8' ';' 'sudo dpkg-reconfigure locales' ';' 'export LC_ALL=en_US.UTF-8' ';' 'export LANG=en_US.UTF-8' ';' 'export LANGUAGE=en_US.UTF-8' ';' 'sudo gem install --no-rdoc --no-ri pdd' ';' 'sudo gem install --no-rdoc --no-ri est' ';' 'sudo gem install --no-rdoc --no-ri xcop' ';' 'mvn versions:set "-DnewVersion=${tag}"' ';' 'git commit -am "${tag}"' ';' 'mvn clean deploy -Ptakes -Psonar -Psonatype -Pqulice -Dinvoker.skip --errors --settings ../settings.xml' ';'
+ sensitive=()
+ gpgconf --reload gpg-agent
+ gpg --keyserver hkp://pool.sks-keyservers.net --verbose --recv-keys 9AF0FA4C
gpg: requesting key 9AF0FA4C from hkp server pool.sks-keyservers.net
gpg: armor header: Version: SKS 1.1.6
gpg: armor header: Comment: Hostname: keyserver.sincer.us
gpg: pub  2048R/9AF0FA4C 2014-08-17  Rultor.com <gpg@rultor.com>
gpg: key 9AF0FA4C: "Rultor.com <gpg@rultor.com>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1
+ gpg --version
gpg (GnuPG) 1.4.20
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: ~/.gnupg
Supported algorithms:
Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
        CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
++ pwd
++ pwd
+ gpg --verbose --keyring=/tmp/rultor-Qxik/.gpg/pubring.gpg --secret-keyring=/tmp/rultor-Qxik/.gpg/secring.gpg --decrypt repo/curl-appveyor.cfg.asc
gpg: armor header: Version: GnuPG v1
gpg: public key is 9A839C3A
gpg: using subkey 9A839C3A instead of primary key 9AF0FA4C
gpg: using subkey 9A839C3A instead of primary key 9AF0FA4C
gpg: encrypted with 2048-bit RSA key, ID 9A839C3A, created 2014-08-17
      "Rultor.com <gpg@rultor.com>"
gpg: AES256 encrypted data
gpg: original file name='curl-appveyor.cfg.enc'
+ gpg --no-tty --batch --verbose --decrypt --passphrase rultor-key:yegor256/takes curl-appveyor.cfg.enc
gpg: armor header: Version: GnuPG v1
gpg: CAST5 encrypted data
gpg: gpg-agent is not available in this session
gpg: encrypted with 1 passphrase
gpg: original file name='curl-appveyor.cfg'
gpg: WARNING: message was not integrity protected
+ rm -rf curl-appveyor.cfg.enc
+ rm -rf .gpg
+ '[' -z '' ']'
+ echo 'tag name is not provided in the request, see http://doc.rultor.com/basics.html'
tag name is not provided in the request, see http://doc.rultor.com/basics.html
+ exit -1
'cid' file is absent, container wasn't started correctly

@0crat
Copy link
Collaborator

0crat commented Dec 6, 2018

@0crat quality good (here)

@ypshenychka The project doesn't have enough funds, can't make a payment

@0crat
Copy link
Collaborator

0crat commented Dec 6, 2018

Order was finished, quality is "good": +35 point(s) just awarded to @olenagerasimova/z

@0crat
Copy link
Collaborator

0crat commented Dec 6, 2018

Quality review completed: +8 point(s) just awarded to @ypshenychka/z

@paulodamaso
Copy link
Contributor

@rultor release, tag 1.11.4

@rultor
Copy link
Collaborator

rultor commented Dec 6, 2018

@rultor release, tag 1.11.4

@paulodamaso OK, I will release it now. Please check the progress here

@rultor
Copy link
Collaborator

rultor commented Dec 6, 2018

@rultor release, tag 1.11.4

@jimkast @paulodamaso Oops, I failed. You can see the full log here (spent 2min)

+ cd repo
+ git config user.email me@rultor.com
+ git config user.name rultor
+ '[' -z 'export '\''MAVEN_OPTS=-XX:MaxPermSize=256m -Xmx1g'\''' ']'
+ cd ..
+ cat
+ '[' false = true ']'
+ cat
+ chmod a+x entry.sh
+ cat
+ echo 'export '\''MAVEN_OPTS=-XX:MaxPermSize=256m -Xmx1g'\''' ';' 'export '\''JAVA_OPTS=-XX:MaxPermSize=256m -Xmx1g'\''' ';' 'export '\''head=git@github.com:yegor256/takes.git'\''' ';' 'export '\''head_branch=master'\''' ';' 'export '\''author=paulodamaso'\''' ';' 'sudo locale-gen en_US en_US.UTF-8' ';' 'sudo dpkg-reconfigure locales' ';' 'export LC_ALL=en_US.UTF-8' ';' 'export LANG=en_US.UTF-8' ';' 'export LANGUAGE=en_US.UTF-8' ';' 'sudo gem install --no-rdoc --no-ri pdd' ';' 'sudo gem install --no-rdoc --no-ri est' ';' 'sudo gem install --no-rdoc --no-ri xcop' ';' 'mvn versions:set "-DnewVersion=${tag}"' ';' 'git commit -am "${tag}"' ';' 'mvn clean deploy -Ptakes -Psonar -Psonatype -Pqulice -Dinvoker.skip --errors --settings ../settings.xml' ';'
+ sensitive=()
+ gpgconf --reload gpg-agent
+ gpg --keyserver hkp://pool.sks-keyservers.net --verbose --recv-keys 9AF0FA4C
gpg: requesting key 9AF0FA4C from hkp server pool.sks-keyservers.net
gpg: armor header: Version: SKS 1.1.6
gpg: armor header: Comment: Hostname: keyserver.sincer.us
gpg: pub  2048R/9AF0FA4C 2014-08-17  Rultor.com <gpg@rultor.com>
gpg: key 9AF0FA4C: "Rultor.com <gpg@rultor.com>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1
+ gpg --version
gpg (GnuPG) 1.4.20
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: ~/.gnupg
Supported algorithms:
Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
        CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
++ pwd
++ pwd
+ gpg --verbose --keyring=/tmp/rultor-9W26/.gpg/pubring.gpg --secret-keyring=/tmp/rultor-9W26/.gpg/secring.gpg --decrypt repo/curl-appveyor.cfg.asc
gpg: armor header: Version: GnuPG v1
gpg: public key is 9A839C3A
gpg: using subkey 9A839C3A instead of primary key 9AF0FA4C
gpg: using subkey 9A839C3A instead of primary key 9AF0FA4C
gpg: encrypted with 2048-bit RSA key, ID 9A839C3A, created 2014-08-17
      "Rultor.com <gpg@rultor.com>"
gpg: AES256 encrypted data
gpg: original file name='curl-appveyor.cfg.enc'
+ gpg --no-tty --batch --verbose --decrypt --passphrase rultor-key:yegor256/takes curl-appveyor.cfg.enc
gpg: armor header: Version: GnuPG v1
gpg: CAST5 encrypted data
gpg: gpg-agent is not available in this session
gpg: encrypted with 1 passphrase
gpg: original file name='curl-appveyor.cfg'
gpg: WARNING: message was not integrity protected
+ rm -rf curl-appveyor.cfg.enc
+ rm -rf .gpg
+ '[' -z '' ']'
+ echo 'tag name is not provided in the request, see http://doc.rultor.com/basics.html'
tag name is not provided in the request, see http://doc.rultor.com/basics.html
+ exit -1
'cid' file is absent, container wasn't started correctly

@paulodamaso
Copy link
Contributor

@rultor release, tag=1.11.4

@rultor
Copy link
Collaborator

rultor commented Dec 6, 2018

@rultor release, tag=1.11.4

@paulodamaso OK, I will release it now. Please check the progress here

@rultor
Copy link
Collaborator

rultor commented Dec 6, 2018

@rultor release, tag=1.11.4

@paulodamaso Done! FYI, the full log is here (took me 13min)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants