Skip to content

Instantly share code, notes, and snippets.

const express = require('express');
const request = require('supertest');
const chai = require('chai');
const should = chai.should();
const app = express();
app.post('/plain', function(req, res){
res.set('Transfer-Encoding', 'chunked'); // <- this is the problem
res.status(200).send('hello');
});
@mikelax
mikelax / TestHttpClient.java
Created January 13, 2015 15:15
Sample Vhost GET Using HttpClient 4.x
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import org.apache.http.HttpStatus;
import org.apache.http.HttpHost;
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
@mikelax
mikelax / tencent-expired-ssl-cert
Created November 26, 2014 14:42
Tencent Expired SSL Cert
Michaels-MacBook-Pro-2:~ Mike$ openssl s_client -connect open.t.qq.com:443 -showcerts
CONNECTED(00000003)
depth=0 C = CN, ST = Guangdong, L = Shenzhen, O = Tencent, CN = nginx
verify error:num=18:self signed certificate
verify return:1
depth=0 C = CN, ST = Guangdong, L = Shenzhen, O = Tencent, CN = nginx
verify error:num=10:certificate has expired
notAfter=Oct 10 01:06:33 2014 GMT
verify return:1
depth=0 C = CN, ST = Guangdong, L = Shenzhen, O = Tencent, CN = nginx
### Keybase proof
I hereby claim:
* I am mikelax on github.
* I am mikelax (https://keybase.io/mikelax) on keybase.
* I have a public key whose fingerprint is 666F 3F56 CC11 6D02 8C0E D13C 8336 34EC CED9 8E42
To claim this, I am signing this object: