Skip to content

Commit 51be23e

Browse files
author
Tamas Bolner
committed
Issue: #2
1 parent 65422f8 commit 51be23e

3 files changed

Lines changed: 16 additions & 13 deletions

File tree

AsyncFastCGI.NET.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<LangVersion>7.3</LangVersion>
55

66
<PackageId>AsyncFastCGI.NET</PackageId>
7-
<Version>1.0.1</Version>
7+
<Version>1.0.2</Version>
88
<Authors>Tamas Bolner</Authors>
99
<Title>Async FastCGI library for .NET Core</Title>
1010
<Description>Fully async FastCGI client library for .NET Core, written in C#. A non-intrusive alternative for developing web applications.</Description>

README.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -130,17 +130,7 @@ NginX settings:
130130

131131
1. Install `.NET Core` on Ubuntu 18.04
132132

133-
Execute the following as root:
134-
135-
```bash
136-
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
137-
dpkg -i packages-microsoft-prod.deb
138-
139-
add-apt-repository universe
140-
apt-get install apt-transport-https
141-
apt-get update
142-
apt-get install dotnet-sdk-2.2
143-
```
133+
- [https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu](https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu)
144134

145135
2. Build or run for debug and development
146136

@@ -159,6 +149,12 @@ NginX settings:
159149
dotnet publish -c Release -r win10-x64
160150
```
161151

152+
4. Create release package
153+
154+
```bash
155+
dotnet pack -c Release
156+
```
157+
162158
### Nginx config
163159

164160
The performance is worse when using the `least_conn` load balancing mode.

lib/FifoStream.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public Dictionary<string, string> GetNameValuePairs() {
181181
break;
182182
}
183183

184-
if (cursor + nameLength + valueLength >= length - 1) {
184+
if (cursor + nameLength + valueLength > length) {
185185
break;
186186
}
187187

@@ -196,6 +196,13 @@ public Dictionary<string, string> GetNameValuePairs() {
196196
return dict;
197197
}
198198

199+
/// <summary>
200+
/// The key-value pairs are specified here:
201+
/// - http://www.mit.edu/~yandros/doc/specs/fcgi-spec.html#S3.4
202+
/// </summary>
203+
/// <param name="cursor"></param>
204+
/// <param name="bufferSize"></param>
205+
/// <returns></returns>
199206
private int ParseNameValueLength(ref int cursor, int bufferSize) {
200207
if (cursor >= bufferSize - 1) {
201208
return -1;

0 commit comments

Comments
 (0)