akiradeveloper / akashic-storage

Filey system backed S3-compatible storage in Scala/Akka-Http
Apache License 2.0
22 stars 2 forks source link

should putting empty object be able? #4

Open akiradeveloper opened 8 years ago

akiradeveloper commented 8 years ago

commit dbdc61f51a3566955b4eab7102ec31e717df2b27

This test fails because reading body (RequestReader) from the entity fails.

  test("put empty object") { p =>
    import p._

    client.createBucket("myb")
    val f = getTestFile("empty.txt")
    client.putObject("myb", "myobj", f)
    val obj = client.getObject("myb", "myobj")
    checkFileContent(obj, f)
  }

In practice, putting empty object is meaningless but what does the S3 spec expect?

Also, what is expected for completing Multipart Upload without uploading parts? (I didn't try this yet but probably be successful)

Anyway, in regard to empty object, Put Object and Multipart Upload should yield the same result.