hades1712
1 Copper

question about atmos 2.20 ve and c bindings

IHAC who do a POC with atmos 2.2.0 VE and C SDK(atmos-c-2.1.6.tar.gz)

Here is some question from customer :

  1. 'Content-Type: text/xml ‘  and‘content-type: application/octet-stream.’in header.  Can they use ‘content-type: application/octet-stream’ to specify all the file type ,no matter what it is?

  They use content-type: application/octet-stream to specify a binary file, they found the checksum is different after reading it from                  atmos.

  But Text file is ok.  here is the checksum of binary file:

[root@localhost i2]# ./i2_file /home/src/emc/atmos-c-2.1.6/i2/i2_file.o
The file to be stored to EMC Atmos=/home/src/emc/atmos-c-2.1.6/i2/i2_file.o
md5 checksum=1c2ca04a000bd48932a4bbfd0f70223c
create object, ret=201, oid=53d8f3b1a19cc29a053d8feac209d2053e3511deea38
Read object and write content to file /home/src/emc/atmos-c-2.1.6/i2/i2_file.o.object
Object len=12912
delete object , ret=204
[root@localhost i2]# md5sum i2_file.o
1c2ca04a000bd48932a4bbfd0f70223c i2_file.o
[root@localhost i2]# md5sum i2_file.o.object
1f0e82dbb5ffcac3b17330bb709c66d8 i2_file.o.object

the attachment 'I2_2014-08-07.zip' is the code by customer .

0 Kudos
2 Replies
Highlighted
JasonCwik
3 Argentium

Re: question about atmos 2.20 ve and c bindings

1. Setting the content type on an object is opaque to Atmos.  Atmos does not evaluate or care what content type you set.  We will simply return the same value when the object is read back.  If you're planning on delivering your content to a web browser via access tokens or shareable URLs, it's important that the value is correctly set.  If you're simply writing data that will be consumed by internal applications it's less important.

2. The problem in the source is that the customer is using strcpy to copy the binary data instead of memcpy.  Strcpy will terminate as soon as it finds a null value (something that will happen often in binary content).

0 Kudos
hades1712
1 Copper

Re: question about atmos 2.20 ve and c bindings

Thanks a lot!!!

0 Kudos