Skip to content

Commit

Permalink
Upgrade 2.7-SNAPSHOT
Browse files Browse the repository at this point in the history
  • Loading branch information
alikemal.ocalan committed Feb 14, 2021
1 parent ed0bf3e commit 4778e24
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Add the dependency:

```
dependencies {
implementation 'com.github.alikemalocalan:greentunnel4jvm:2.3-SNAPSHOT'
implementation 'com.github.alikemalocalan:greentunnel4jvm:2.6-SNAPSHOT'
}
```

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
kotlin.code.style=official
kotlin_version=1.4.21-2
kotlin_version=1.4.30
projectGroup=com.github.alikemalocalan
projectName=greentunnel4jvm
projectVersion=2.6-SNAPSHOT
projectVersion=2.7-SNAPSHOT
projectMainClassName=com.github.alikemalocalan.greentunnel4jvm.gui.Gui
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.alikemalocalan</groupId>
<artifactId>greentunnel4jvm</artifactId>
<version>2.6-SNAPSHOT</version>
<version>2.7-SNAPSHOT</version>
<inceptionYear>2008</inceptionYear>
<licenses>
<license>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ProxyClientHandler : ChannelInboundHandlerAdapter() {
HttpServiceUtils.httpRequestFromByteBuf(buf).ifPresent { request ->
if (request.isHttps) {
remoteChannelOpt = sendRequestToRemoteChannel(ctx, request)
if (remoteChannelOpt.isEmpty)
if (!remoteChannelOpt.isPresent)
ctx.writeAndFlush(Unpooled.EMPTY_BUFFER).addListener(ChannelFutureListener.CLOSE)
} else { //if http,force to https without any remote connection
val response = HttpServiceUtils.redirectHttpToHttps(request.host())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ object HttpServiceUtils {
"%s\n%s\n%s",
method,
headerLines,
payload,
payload
)

return Unpooled.copiedBuffer(responseAsString, CharsetUtil.UTF_8)
Expand Down

0 comments on commit 4778e24

Please sign in to comment.