varnish-cache icon indicating copy to clipboard operation
varnish-cache copied to clipboard

Quo vadis ban serialization format

Open nigoroll opened this issue 8 months ago • 3 comments

I would like to make progress on clarifying how our the ban serialization format should look like.

At this point I see two options being discussed:

A) Go all the way to text format (ref: IRC log in https://github.com/varnishcache/varnish-cache/pull/4289#issuecomment-2872629659)

I learned out-of-band about concerns that we could run into quoting hell, but I do not quite see the problem if we control both the serialization and the deserialization. Is there a case where ban_render with quote = 1 would not do the right thing already?

B) Continue to use a binary format, but fix it

  • Properly (de)serialize pcre
  • #4289

nigoroll avatar May 21 '25 13:05 nigoroll

Out of curiosity, what is the problem with PCRE serialization? I thought VRE_unpack()/VRE_export() took care of that.

edit: I followed the trail and found it. I suppose we lack VRE_{en,de}code() functions.

dridi avatar May 21 '25 13:05 dridi

Hi, FYI, I'm currently trying to add VRE_encode/decode functions over here https://github.com/cartoush/varnish-cache/tree/pcre_serialize_bans

cartoush avatar Jun 03 '25 14:06 cartoush