How is data stored on a CardDav server? - webdav

I wanted to ask a question about server data. I am new to server programming, but I have to learn about the CardDav server (CardDav is developed by the WebDav).
I only know the CardDav server is used to hold the address book data, but what form of the data does the server actually hold (e.g. .CSV or .txt)? Can anyone help me? Thank you very much.

The format on the server is up to the server. The format on the wire is vCard (RFC 2426, to be updated soonish).

The file format used is vCard; the wikipedia entry contains a basic explanation of the file format:
http://en.wikipedia.org/wiki/VCard
For the gory details, take a look at RFC2426: https://www.rfc-editor.org/rfc/rfc2426

Related

Is there a coding that can find server time of a particular site in R?

Need to find the exact server time of an particular site(that actually flows or refreshes every millisecond)
If there is a way can you walk me through?
Not sure what you want to do.But you can download a html file using
utils::download.file(URL, target_file_path)
Best you can hope for I think is to use some IP Geolocation API to guess the location of said webserver, heuristically determine his timezone and assume a bunch of things, such as:
the server is using his local timezone (instead of UTC);
the server's clock is properly synchronised using NTP;
the server is not located behind reverse proxies in some other location.
If these hold true you have your answer (server time of a given server)

Invisible contacts in CardDAV

Question
How can I access all contacts on a CommuniGate Pro Server?
Context
I need to migrate contacts from 70 email accounts stored on a Communigate Pro server. Since CommuniGate supports CardDAV, I decided to use this protocol rather than exporting the contacts manually from their web client, Pronto.
I have managed to access the CardDAV folders and to extract the vCards contained there. However, the problem is that not all of the contacts show up in CardDAV; in particular, the web client contains subgroups of contacts that are invisible in CardDAV.
When I export these subgroups from the web client, they are outputted as a txt file in a proprietary format called vCardGroup. Even though I wrote a PHP script to convert vCardGroup to vCard, using this method is still very slow.
I will be grateful if you suggest a way to extract these contact subgroups programmatically. I understand that CardDAV does not support subgroups, so I guess that the big question is: where are these txt files stored?
As a reference, please find here the result of a PROPFIND request on the root of the CardDAV folder. Note that CommuniGate seems to implement CardDAV via http://calendarserver.org.
Thank you for your attention!
After contacting the Communigate Pro (CGP) support team, I am able to answer my own question:
The only way to extract contacts programmatically from a Communigate Pro server is having root access to the server and use a protocol like XIMSS.
They also told me that CGP's support of CardDAV is limited, and does not include subgroups.
Since the server administrator is an evil man, I will have to extract the contacts manually using the web client, Pronto.
Just in case some poor soul is in my same situation, I provide a link to my script to convert the proprietary vGroupCard format (ie. BEGIN:VGROUP) to the standard vCard format (ie. BEGIN:VCARD).

Render HTML from a ZIP stream on client side

This is both a strategy and a technical question, I'm building a web posting mechanism and I will need to store a lot of HTML posts (discussions, comments etc.)
I'm thinking about saving all my HTML posts into database as a ZIP compressed stream (instead of plain text or XML) in order to save space and increase security by encrypting those ZIP data steams, so it will be saved to the database compressed (hopefully close to 90% smaller) and secure. (it does not need to be searchable, I'm going to create the search index myself out of the content of each post)
I want to deliver the ZIP object to the web page/cache and then have the client side unzip the stream and render the HTML that it represent.
This is a Microsoft based MVC web site (c#)
I'm trying to figure out reasons not to do it... other than performance, can anyone pinpoint any other issues with doing something like that?
Also, is there any recommended libraries or built-in ones that I should use for better performance - that both server side and client side can understand (zip and unzip with encryption key/password)?
Thanks in advance.
In normal operation, http allows to send the html in a gzipped stream. The webserver compresses the data and sets the corresponding header. The client then unzips transparently.
You simply have to make sure to set the correct header and not have the webserver zip again the already zipped stream.
I see a major drawbacks :
You cannot alter the data. That means you cannot add the code for your template nor link between the pages.
I don't think this is a good approach. Store your data as you like and decompress it on the server.

When using HTTP, which encoding is better, base64, yEnc, or uuencode?

My requirement is to encode data and send it across network via HTTP, but I am stuck trying to choose the best encoding technique. Which of the three above is best? Is there anything better?
The criteria for "best" should be small size and fast encoding/decoding.
yEnc has less overhead but has other problems mentioned here http://en.wikipedia.org/wiki/YEnc#Criticisms.
What is "best" depends on the criteria you might have and how you plan to send data over the network. Are you using a web service, email or other means. You need to provide more details.
Edit:
Since you are uploading data via HTTP, you do not need to use any of Base64, yEnc or Uuencode. You just use the standard http file upload built in facility in both browser and web server. See this question as a reference:
How does HTTP file upload work?
Also this reference:
http://www.hanselman.com/blog/ABackToBasicsCaseStudyImplementingHTTPFileUploadWithASPNETMVCIncludingTestsAndMocks.aspx

What kind of server do I have to use?

I want to code an application quite basic:
A client sends a JSON formated string to a server that asynchronously publish it.
I mean, all the clients will also get the JSON as soon as the server publishes it.
My question is about:
What kind of server to use (I basically only know a bit about web services and servlets)
Where can I host and run the resulting code ? I guess it won't be free, of course.
Sorry if the question seems a bit too wide or something
Python or ruby are well suited for creating such servers
A simple solution is to host an app on Heroku

Resources