Skip to content

Instantly share code, notes, and snippets.

@mikeshepherd
mikeshepherd / reproduction.scala
Last active August 25, 2023 13:17
Reproduce inconsistent behaviour for NoContent responses
//> using scala "2.13.10"
//> using option "-feature"
//> using lib "org.http4s::http4s-ember-client:0.23.23"
//> using lib "org.http4s::http4s-ember-server:0.23.23"
//> using lib "org.http4s::http4s-dsl:0.23.23"
import cats.effect._
import cats.implicits._
import com.comcast.ip4s._
import org.http4s._
@mikeshepherd
mikeshepherd / content-length-reproduction.scala
Last active August 25, 2023 12:03
Reproduction of unexpected behaviour with No-Content responses in smithy4s-http4s
//> using scala "2.13.10"
//> using option "-feature"
//> using lib "software.amazon.smithy:smithy-model:1.28.1"
//> using lib "com.disneystreaming.smithy4s::smithy4s-http4s:0.17.9"
//> using lib "org.http4s::http4s-ember-client:0.23.23"
//> using lib "org.http4s::http4s-ember-server:0.23.23"
import cats.effect._
import cats.implicits._
import com.comcast.ip4s._
@mikeshepherd
mikeshepherd / NameConstraintBug.java
Last active July 5, 2023 11:19
Reproduce Name Constraints bug
import java.io.*;
import java.nio.file.*;
import java.util.*;
import java.security.Security;
import java.security.cert.*;
public class NameConstraintBug {
private static CertPath generateCertificatePath(String caStr, String targetCertStr) throws CertificateException {